Skip to content

Commit

Permalink
Merge pull request #62 from OskarStark/feature/rename-test-methods
Browse files Browse the repository at this point in the history
Rename test methods
  • Loading branch information
slunak authored Aug 28, 2024
2 parents 18f1a3f + cdb4c8e commit dce06ae
Show file tree
Hide file tree
Showing 27 changed files with 109 additions and 109 deletions.
2 changes: 1 addition & 1 deletion tests/Api/Glances/GlanceDataFieldsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
class GlanceDataFieldsTest extends TestCase
{
public function testCanBeCreated(): void
public function testCanBeConstructed(): void
{
$glanceDataFields = new GlanceDataFields();

Expand Down
18 changes: 9 additions & 9 deletions tests/Api/Glances/GlanceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/
class GlanceTest extends TestCase
{
public function testCanBeCreated(): Glance
public function testCanBeConstructed(): Glance
{
$application = new Application('cccc3333CCCC3333dddd4444DDDD44'); // using dummy token
$recipient = new Recipient('aaaa1111AAAA1111bbbb2222BBBB22'); // using dummy user key
Expand All @@ -40,31 +40,31 @@ public function testCanBeCreated(): Glance
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testGetGlanceDataFields(Glance $glance): void
{
$this->assertInstanceOf(GlanceDataFields::class, $glance->getGlanceDataFields());
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testGetApplication(Glance $glance): void
{
$this->assertInstanceOf(Application::class, $glance->getApplication());
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testGetRecipient(Glance $glance): void
{
$this->assertInstanceOf(Recipient::class, $glance->getRecipient());
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testSetApplication(Glance $glance): void
{
Expand All @@ -75,7 +75,7 @@ public function testSetApplication(Glance $glance): void
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testSetGlanceDataFields(Glance $glance): void
{
Expand All @@ -86,7 +86,7 @@ public function testSetGlanceDataFields(Glance $glance): void
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testSetRecipient(Glance $glance): void
{
Expand All @@ -97,7 +97,7 @@ public function testSetRecipient(Glance $glance): void
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testHasAtLeastOneField(Glance $glance): void
{
Expand All @@ -109,7 +109,7 @@ public function testHasAtLeastOneField(Glance $glance): void
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testHasRecipient(Glance $glance): void
{
Expand Down
6 changes: 3 additions & 3 deletions tests/Api/Groups/GroupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/
class GroupTest extends TestCase
{
public function testCanBeCreated(): Group
public function testCanBeConstructed(): Group
{
$application = new Application('cccc3333CCCC3333dddd4444DDDD44'); // using dummy token
$group = new Group('eeee5555EEEE5555ffff6666FFFF66', $application); // using dummy group key
Expand All @@ -36,7 +36,7 @@ public function testCanBeCreated(): Group
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testGetApplication(Group $group): void
{
Expand All @@ -45,7 +45,7 @@ public function testGetApplication(Group $group): void
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testGetKey(Group $group): void
{
Expand Down
22 changes: 11 additions & 11 deletions tests/Api/Licensing/LicenseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

class LicenseTest extends TestCase
{
public function testCanBeCreated(): License
public function testCanBeConstructed(): License
{
$application = new Application('cccc3333CCCC3333dddd4444DDDD44'); // using dummy token
$license = new License($application);
Expand All @@ -33,15 +33,15 @@ public function testCanBeCreated(): License
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testGetApplication(License $license): void
{
$this->assertInstanceOf(Application::class, $license->getApplication());
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testSetApplication(License $license): void
{
Expand All @@ -52,15 +52,15 @@ public function testSetApplication(License $license): void
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testGetRecipient(License $license): void
{
$this->assertNull($license->getRecipient());
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testSetRecipient(License $license): void
{
Expand All @@ -74,15 +74,15 @@ public function testSetRecipient(License $license): void
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testGetEmail(License $license): void
{
$this->assertNull($license->getEmail());
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testSetEmail(License $license): void
{
Expand All @@ -96,15 +96,15 @@ public function testSetEmail(License $license): void
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testGetOs(License $license): void
{
$this->assertNull($license->getOs());
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testSetOs(License $license): void
{
Expand All @@ -119,7 +119,7 @@ public function testSetOs(License $license): void
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testCanBeAssigned(License $license): void
{
Expand All @@ -142,7 +142,7 @@ public function testCanBeAssigned(License $license): void
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testGetAvailableOsTypes(License $license): void
{
Expand Down
18 changes: 9 additions & 9 deletions tests/Api/Message/AttachmentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,46 +22,46 @@
*/
class AttachmentTest extends TestCase
{
public function testCanBeCreated(): Attachment
public function testCanBeConstructed(): Attachment
{
$attachment = new Attachment('/images/test.jpeg', Attachment::MIME_TYPE_JPEG);
$this->assertInstanceOf(Attachment::class, $attachment);

return $attachment;
}

public function testCannotBeCreatedWithInvalidMimeType(): void
public function testCannotBeConstructedWithInvalidMimeType(): void
{
$this->expectException(InvalidArgumentException::class);

new Attachment('/images/test.jpeg', 'image/invalid');
}

public function testCannotBeCreatedWithInvalidExtension(): void
public function testCannotBeConstructedWithInvalidExtension(): void
{
$this->expectException(InvalidArgumentException::class);

new Attachment('/images/test.invalid', Attachment::MIME_TYPE_JPEG);
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testGetMimeType(Attachment $attachment): void
{
$this->assertEquals(Attachment::MIME_TYPE_JPEG, $attachment->getMimeType());
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testGetFilename(Attachment $attachment): void
{
$this->assertEquals('/images/test.jpeg', $attachment->getFilename());
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testSetMimeType(Attachment $attachment): void
{
Expand All @@ -73,7 +73,7 @@ public function testSetMimeType(Attachment $attachment): void
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testSetFilename(Attachment $attachment): void
{
Expand All @@ -85,7 +85,7 @@ public function testSetFilename(Attachment $attachment): void
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testGetSupportedAttachmentTypes(Attachment $attachment): void
{
Expand All @@ -95,7 +95,7 @@ public function testGetSupportedAttachmentTypes(Attachment $attachment): void
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testGetSupportedAttachmentExtensions(Attachment $attachment): void
{
Expand Down
12 changes: 6 additions & 6 deletions tests/Api/Message/CustomSoundTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@
*/
class CustomSoundTest extends TestCase
{
public function testCanBeCreated(): CustomSound
public function testCanBeConstructed(): CustomSound
{
$this->assertInstanceOf(CustomSound::class, $customSound = new CustomSound('door_open'));

return $customSound;
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testGetCustomSound(CustomSound $customSound): void
{
$this->assertEquals('door_open', $customSound->getCustomSound());
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testSetCustomSound(CustomSound $customSound): void
{
Expand All @@ -56,7 +56,7 @@ public function testSetCustomSound(CustomSound $customSound): void
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testSetExistingCustomSound(CustomSound $customSound): void
{
Expand All @@ -66,7 +66,7 @@ public function testSetExistingCustomSound(CustomSound $customSound): void
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testSetInvalidCustomSound(CustomSound $customSound): void
{
Expand All @@ -76,7 +76,7 @@ public function testSetInvalidCustomSound(CustomSound $customSound): void
}

/**
* @depends testCanBeCreated
* @depends testCanBeConstructed
*/
public function testSetLongCustomSound(CustomSound $customSound): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Api/Message/MessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

class MessageTest extends TestCase
{
public function testCanBeCreated(): void
public function testCanBeConstructed(): void
{
$message = new Message('This is a test message', 'This is a title of the message');

Expand Down
Loading

0 comments on commit dce06ae

Please sign in to comment.