From cdb4c8ec1d7aa881d49a8b1492df775b293c635c Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Wed, 28 Aug 2024 20:50:48 +0200 Subject: [PATCH] Rename test methods --- tests/Api/Glances/GlanceDataFieldsTest.php | 2 +- tests/Api/Glances/GlanceTest.php | 18 +++++++-------- tests/Api/Groups/GroupTest.php | 6 ++--- tests/Api/Licensing/LicenseTest.php | 22 +++++++++---------- tests/Api/Message/AttachmentTest.php | 18 +++++++-------- tests/Api/Message/CustomSoundTest.php | 12 +++++----- tests/Api/Message/MessageTest.php | 2 +- tests/Api/Message/NotificationTest.php | 14 ++++++------ tests/Api/Message/PriorityTest.php | 12 +++++----- tests/Api/Message/SoundTest.php | 8 +++---- tests/Api/Receipts/ReceiptTest.php | 4 ++-- tests/Api/Subscription/SubscriptionTest.php | 6 ++--- .../UserGroupValidation/ValidationTest.php | 4 ++-- tests/ApplicationTest.php | 10 ++++----- tests/Client/GlancesClientTest.php | 2 +- tests/Client/GroupsClientTest.php | 2 +- tests/Client/ReceiptClientTest.php | 4 ++-- tests/Client/Response/GlancesResponseTest.php | 2 +- tests/Client/Response/LicenseResponseTest.php | 2 +- .../Response/ListGroupsResponseTest.php | 4 ++-- tests/Client/Response/ReceiptResponseTest.php | 20 ++++++++--------- .../Response/RetrieveGroupResponseTest.php | 6 ++--- .../Response/SubscriptionResponseTest.php | 2 +- .../UserGroupValidationResponseTest.php | 8 +++---- tests/Client/SubscriptionClientTest.php | 2 +- .../Client/UserGroupValidationClientTest.php | 6 ++--- tests/RecipientTest.php | 20 ++++++++--------- 27 files changed, 109 insertions(+), 109 deletions(-) diff --git a/tests/Api/Glances/GlanceDataFieldsTest.php b/tests/Api/Glances/GlanceDataFieldsTest.php index 234b81a..bc5e5d2 100644 --- a/tests/Api/Glances/GlanceDataFieldsTest.php +++ b/tests/Api/Glances/GlanceDataFieldsTest.php @@ -22,7 +22,7 @@ */ class GlanceDataFieldsTest extends TestCase { - public function testCanBeCreated(): void + public function testCanBeConstructed(): void { $glanceDataFields = new GlanceDataFields(); diff --git a/tests/Api/Glances/GlanceTest.php b/tests/Api/Glances/GlanceTest.php index ac6cc9b..314901d 100644 --- a/tests/Api/Glances/GlanceTest.php +++ b/tests/Api/Glances/GlanceTest.php @@ -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 @@ -40,7 +40,7 @@ public function testCanBeCreated(): Glance } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetGlanceDataFields(Glance $glance): void { @@ -48,7 +48,7 @@ public function testGetGlanceDataFields(Glance $glance): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetApplication(Glance $glance): void { @@ -56,7 +56,7 @@ public function testGetApplication(Glance $glance): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetRecipient(Glance $glance): void { @@ -64,7 +64,7 @@ public function testGetRecipient(Glance $glance): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetApplication(Glance $glance): void { @@ -75,7 +75,7 @@ public function testSetApplication(Glance $glance): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetGlanceDataFields(Glance $glance): void { @@ -86,7 +86,7 @@ public function testSetGlanceDataFields(Glance $glance): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetRecipient(Glance $glance): void { @@ -97,7 +97,7 @@ public function testSetRecipient(Glance $glance): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testHasAtLeastOneField(Glance $glance): void { @@ -109,7 +109,7 @@ public function testHasAtLeastOneField(Glance $glance): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testHasRecipient(Glance $glance): void { diff --git a/tests/Api/Groups/GroupTest.php b/tests/Api/Groups/GroupTest.php index b61fdbb..c576101 100644 --- a/tests/Api/Groups/GroupTest.php +++ b/tests/Api/Groups/GroupTest.php @@ -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 @@ -36,7 +36,7 @@ public function testCanBeCreated(): Group } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetApplication(Group $group): void { @@ -45,7 +45,7 @@ public function testGetApplication(Group $group): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetKey(Group $group): void { diff --git a/tests/Api/Licensing/LicenseTest.php b/tests/Api/Licensing/LicenseTest.php index 0a5eb8e..d9377aa 100644 --- a/tests/Api/Licensing/LicenseTest.php +++ b/tests/Api/Licensing/LicenseTest.php @@ -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); @@ -33,7 +33,7 @@ public function testCanBeCreated(): License } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetApplication(License $license): void { @@ -41,7 +41,7 @@ public function testGetApplication(License $license): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetApplication(License $license): void { @@ -52,7 +52,7 @@ public function testSetApplication(License $license): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetRecipient(License $license): void { @@ -60,7 +60,7 @@ public function testGetRecipient(License $license): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetRecipient(License $license): void { @@ -74,7 +74,7 @@ public function testSetRecipient(License $license): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetEmail(License $license): void { @@ -82,7 +82,7 @@ public function testGetEmail(License $license): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetEmail(License $license): void { @@ -96,7 +96,7 @@ public function testSetEmail(License $license): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetOs(License $license): void { @@ -104,7 +104,7 @@ public function testGetOs(License $license): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetOs(License $license): void { @@ -119,7 +119,7 @@ public function testSetOs(License $license): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testCanBeAssigned(License $license): void { @@ -142,7 +142,7 @@ public function testCanBeAssigned(License $license): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetAvailableOsTypes(License $license): void { diff --git a/tests/Api/Message/AttachmentTest.php b/tests/Api/Message/AttachmentTest.php index 05398ea..022f1c1 100644 --- a/tests/Api/Message/AttachmentTest.php +++ b/tests/Api/Message/AttachmentTest.php @@ -22,7 +22,7 @@ */ 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); @@ -30,14 +30,14 @@ public function testCanBeCreated(): 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); @@ -45,7 +45,7 @@ public function testCannotBeCreatedWithInvalidExtension(): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetMimeType(Attachment $attachment): void { @@ -53,7 +53,7 @@ public function testGetMimeType(Attachment $attachment): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetFilename(Attachment $attachment): void { @@ -61,7 +61,7 @@ public function testGetFilename(Attachment $attachment): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetMimeType(Attachment $attachment): void { @@ -73,7 +73,7 @@ public function testSetMimeType(Attachment $attachment): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetFilename(Attachment $attachment): void { @@ -85,7 +85,7 @@ public function testSetFilename(Attachment $attachment): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetSupportedAttachmentTypes(Attachment $attachment): void { @@ -95,7 +95,7 @@ public function testGetSupportedAttachmentTypes(Attachment $attachment): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetSupportedAttachmentExtensions(Attachment $attachment): void { diff --git a/tests/Api/Message/CustomSoundTest.php b/tests/Api/Message/CustomSoundTest.php index 0c62ce0..a6a0049 100644 --- a/tests/Api/Message/CustomSoundTest.php +++ b/tests/Api/Message/CustomSoundTest.php @@ -22,7 +22,7 @@ */ class CustomSoundTest extends TestCase { - public function testCanBeCreated(): CustomSound + public function testCanBeConstructed(): CustomSound { $this->assertInstanceOf(CustomSound::class, $customSound = new CustomSound('door_open')); @@ -30,7 +30,7 @@ public function testCanBeCreated(): CustomSound } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetCustomSound(CustomSound $customSound): void { @@ -38,7 +38,7 @@ public function testGetCustomSound(CustomSound $customSound): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetCustomSound(CustomSound $customSound): void { @@ -56,7 +56,7 @@ public function testSetCustomSound(CustomSound $customSound): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetExistingCustomSound(CustomSound $customSound): void { @@ -66,7 +66,7 @@ public function testSetExistingCustomSound(CustomSound $customSound): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetInvalidCustomSound(CustomSound $customSound): void { @@ -76,7 +76,7 @@ public function testSetInvalidCustomSound(CustomSound $customSound): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetLongCustomSound(CustomSound $customSound): void { diff --git a/tests/Api/Message/MessageTest.php b/tests/Api/Message/MessageTest.php index e464083..be7370e 100644 --- a/tests/Api/Message/MessageTest.php +++ b/tests/Api/Message/MessageTest.php @@ -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'); diff --git a/tests/Api/Message/NotificationTest.php b/tests/Api/Message/NotificationTest.php index 91f619a..d537d53 100644 --- a/tests/Api/Message/NotificationTest.php +++ b/tests/Api/Message/NotificationTest.php @@ -28,7 +28,7 @@ */ class NotificationTest extends TestCase { - public function testCanBeCreated(): Notification + public function testCanBeConstructed(): Notification { $application = new Application('cccc3333CCCC3333dddd4444DDDD44'); // using dummy token $recipient = new Recipient('aaaa1111AAAA1111bbbb2222BBBB22'); // using dummy user key @@ -43,7 +43,7 @@ public function testCanBeCreated(): Notification } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetSound(Notification $notification): void { @@ -53,7 +53,7 @@ public function testSetSound(Notification $notification): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetSoundNull(Notification $notification): void { @@ -63,7 +63,7 @@ public function testSetSoundNull(Notification $notification): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetCustomSound(Notification $notification): void { @@ -73,7 +73,7 @@ public function testSetCustomSound(Notification $notification): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetCustomSoundNull(Notification $notification): void { @@ -83,7 +83,7 @@ public function testSetCustomSoundNull(Notification $notification): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetAttachment(Notification $notification): void { @@ -94,7 +94,7 @@ public function testSetAttachment(Notification $notification): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetAttachmentNull(Notification $notification): void { diff --git a/tests/Api/Message/PriorityTest.php b/tests/Api/Message/PriorityTest.php index 8bea0fb..1eaa8b6 100644 --- a/tests/Api/Message/PriorityTest.php +++ b/tests/Api/Message/PriorityTest.php @@ -23,7 +23,7 @@ */ class PriorityTest extends TestCase { - public function testCanBeCreated(): Priority + public function testCanBeConstructed(): Priority { $priority = new Priority(); @@ -32,14 +32,14 @@ public function testCanBeCreated(): Priority return $priority; } - public function testCanBeCreatedWithNormalPriority(): void + public function testCanBeConstructedWithNormalPriority(): void { $priority = new Priority(Priority::NORMAL); $this->assertInstanceOf(Priority::class, $priority); } - public function testCanBeCreatedWithEmergencyPriority(): Priority + public function testCanBeConstructedWithEmergencyPriority(): Priority { $priority = new Priority(Priority::EMERGENCY, 30, 600); @@ -48,7 +48,7 @@ public function testCanBeCreatedWithEmergencyPriority(): Priority return $priority; } - public function testCannotBeCreatedWithInvalidPriority(): void + public function testCannotBeConstructedWithInvalidPriority(): void { $this->expectException(InvalidArgumentException::class); @@ -63,7 +63,7 @@ public function testEmergencyPriorityRequiresExtraParams(): void } /** - * @depends testCanBeCreatedWithEmergencyPriority + * @depends testCanBeConstructedWithEmergencyPriority */ public function testSetCallback(Priority $priority): Priority { @@ -83,7 +83,7 @@ public function testGetCallback(Priority $priority): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testAvailablePriorities(Priority $priority): void { diff --git a/tests/Api/Message/SoundTest.php b/tests/Api/Message/SoundTest.php index 004e8e1..b0bd5d4 100644 --- a/tests/Api/Message/SoundTest.php +++ b/tests/Api/Message/SoundTest.php @@ -22,7 +22,7 @@ */ class SoundTest extends TestCase { - public function testCanBeCreated(): Sound + public function testCanBeConstructed(): Sound { $this->assertInstanceOf(Sound::class, $sound = new Sound(Sound::PUSHOVER)); @@ -30,7 +30,7 @@ public function testCanBeCreated(): Sound } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetSound(Sound $sound): void { @@ -38,7 +38,7 @@ public function testGetSound(Sound $sound): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testAvailableSounds(Sound $sound): void { @@ -48,7 +48,7 @@ public function testAvailableSounds(Sound $sound): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetSound(Sound $sound): void { diff --git a/tests/Api/Receipts/ReceiptTest.php b/tests/Api/Receipts/ReceiptTest.php index 8ce710c..71487a9 100644 --- a/tests/Api/Receipts/ReceiptTest.php +++ b/tests/Api/Receipts/ReceiptTest.php @@ -24,7 +24,7 @@ */ class ReceiptTest extends TestCase { - public function testCanBeCreated(): Receipt + public function testCanBeConstructed(): Receipt { $application = new Application('cccc3333CCCC3333dddd4444DDDD44'); // using dummy token @@ -36,7 +36,7 @@ public function testCanBeCreated(): Receipt } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetApplication(Receipt $receipt): void { diff --git a/tests/Api/Subscription/SubscriptionTest.php b/tests/Api/Subscription/SubscriptionTest.php index 2a8aa93..1ef5a7f 100644 --- a/tests/Api/Subscription/SubscriptionTest.php +++ b/tests/Api/Subscription/SubscriptionTest.php @@ -24,7 +24,7 @@ */ class SubscriptionTest extends TestCase { - public function testCanBeCreated(): Subscription + public function testCanBeConstructed(): Subscription { $application = new Application('cccc3333CCCC3333dddd4444DDDD44'); // using dummy token $subscription = new Subscription($application, 'dummy-subscription-aaa111bbb222ccc'); // using dummy subscription code @@ -35,7 +35,7 @@ public function testCanBeCreated(): Subscription } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetSubscriptionCode(Subscription $subscription): void { @@ -43,7 +43,7 @@ public function testGetSubscriptionCode(Subscription $subscription): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetApplication(Subscription $subscription): void { diff --git a/tests/Api/UserGroupValidation/ValidationTest.php b/tests/Api/UserGroupValidation/ValidationTest.php index b42b3f5..770df17 100644 --- a/tests/Api/UserGroupValidation/ValidationTest.php +++ b/tests/Api/UserGroupValidation/ValidationTest.php @@ -24,7 +24,7 @@ */ class ValidationTest extends TestCase { - public function testCanBeCreated(): Validation + public function testCanBeConstructed(): Validation { $application = new Application('cccc3333CCCC3333dddd4444DDDD44'); // using dummy token $validation = new Validation($application); @@ -35,7 +35,7 @@ public function testCanBeCreated(): Validation } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetApplication(Validation $validation): void { diff --git a/tests/ApplicationTest.php b/tests/ApplicationTest.php index 498ab76..dcb1328 100644 --- a/tests/ApplicationTest.php +++ b/tests/ApplicationTest.php @@ -17,7 +17,7 @@ class ApplicationTest extends TestCase { - public function testCanBeCreated(): Application + public function testCanBeConstructed(): Application { $application = new Application('cccc3333CCCC3333dddd4444DDDD44'); @@ -26,26 +26,26 @@ public function testCanBeCreated(): Application return $application; } - public function testCannotBeCreated(): void + public function testCannotBeConstructed(): void { $this->expectException(InvalidArgumentException::class); new Application('Lorem ipsum dolor sit amet'); } - public function testCannotBeCreatedFromInvalidApiToken(): void + public function testCannotBeConstructedFromInvalidApiToken(): void { $this->expectException(InvalidArgumentException::class); new Application('this-is-invalid-token'); } - public function testCannotBeCreatedFromShortApiToken(): void + public function testCannotBeConstructedFromShortApiToken(): void { $this->expectException(InvalidArgumentException::class); new Application('token'); } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetToken(Application $application): void { diff --git a/tests/Client/GlancesClientTest.php b/tests/Client/GlancesClientTest.php index eef5a8c..aad2f69 100644 --- a/tests/Client/GlancesClientTest.php +++ b/tests/Client/GlancesClientTest.php @@ -22,7 +22,7 @@ class GlancesClientTest extends TestCase { - public function testCanBeCreated(): void + public function testCanBeConstructed(): void { $client = new GlancesClient(); diff --git a/tests/Client/GroupsClientTest.php b/tests/Client/GroupsClientTest.php index b5e23c0..b20a227 100644 --- a/tests/Client/GroupsClientTest.php +++ b/tests/Client/GroupsClientTest.php @@ -24,7 +24,7 @@ */ class GroupsClientTest extends TestCase { - public function testCanBeCreated(): void + public function testCanBeConstructed(): void { $application = new Application('cccc3333CCCC3333dddd4444DDDD44'); // using dummy token $group = new Group('eeee5555EEEE5555ffff6666FFFF66', $application); // using dummy group key diff --git a/tests/Client/ReceiptClientTest.php b/tests/Client/ReceiptClientTest.php index 94f43d4..e8190e8 100644 --- a/tests/Client/ReceiptClientTest.php +++ b/tests/Client/ReceiptClientTest.php @@ -22,7 +22,7 @@ */ class ReceiptClientTest extends TestCase { - public function testCanBeCreated(): ReceiptClient + public function testCanBeConstructed(): ReceiptClient { $application = new Application('cccc3333CCCC3333dddd4444DDDD44'); // using dummy token $client = new ReceiptClient($application, 'gggg7777GGGG7777hhhh8888HHHH88'); // using dummy receipt @@ -33,7 +33,7 @@ public function testCanBeCreated(): ReceiptClient } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testBuildApiUrl(ReceiptClient $client): void { diff --git a/tests/Client/Response/GlancesResponseTest.php b/tests/Client/Response/GlancesResponseTest.php index dd7569a..f6f20e7 100644 --- a/tests/Client/Response/GlancesResponseTest.php +++ b/tests/Client/Response/GlancesResponseTest.php @@ -18,7 +18,7 @@ class GlancesResponseTest extends TestCase { - public function testCanBeCreated(): void + public function testCanBeConstructed(): void { $successfulCurlResponse = '{"status":1,"request":"aaaaaaaa-1111-bbbb-2222-cccccccccccc"}'; $response = new GlancesResponse($successfulCurlResponse); diff --git a/tests/Client/Response/LicenseResponseTest.php b/tests/Client/Response/LicenseResponseTest.php index 59fa28e..ae11fdf 100644 --- a/tests/Client/Response/LicenseResponseTest.php +++ b/tests/Client/Response/LicenseResponseTest.php @@ -21,7 +21,7 @@ */ class LicenseResponseTest extends TestCase { - public function testCanBeCreated(): void + public function testCanBeConstructed(): void { $successfulCurlResponse = '{"credits":5,"status":1,"request":"aaaaaaaa-1111-bbbb-2222-cccccccccccc"}'; $response = new LicenseResponse($successfulCurlResponse); diff --git a/tests/Client/Response/ListGroupsResponseTest.php b/tests/Client/Response/ListGroupsResponseTest.php index 473733a..5e8a4bb 100644 --- a/tests/Client/Response/ListGroupsResponseTest.php +++ b/tests/Client/Response/ListGroupsResponseTest.php @@ -18,7 +18,7 @@ final class ListGroupsResponseTest extends TestCase { - public function testCanBeCreated(): ListGroupsResponse + public function testCanBeConstructed(): ListGroupsResponse { $successfulCurlResponse = '{"groups":[{"group":"111111111111111111111111111111","name":"Group1"},{"group":"222222222222222222222222222222","name":"group2"},{"group":"333333333333333333333333333333","name":"Group 3"}],"status":1,"request":"aaaaaaaa-1111-bbbb-2222-cccccccccccc"}'; $response = new ListGroupsResponse($successfulCurlResponse); @@ -31,7 +31,7 @@ public function testCanBeCreated(): ListGroupsResponse } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetGroups(ListGroupsResponse $response): void { diff --git a/tests/Client/Response/ReceiptResponseTest.php b/tests/Client/Response/ReceiptResponseTest.php index 46f3b93..67b6102 100644 --- a/tests/Client/Response/ReceiptResponseTest.php +++ b/tests/Client/Response/ReceiptResponseTest.php @@ -22,7 +22,7 @@ */ class ReceiptResponseTest extends TestCase { - public function testCanBeCreated(): ReceiptResponse + public function testCanBeConstructed(): ReceiptResponse { $unSuccessfulCurlResponse = '{"receipt":"not found","errors":["receipt not found; may be invalid or expired"],"status":0,"request":"aaaaaaaa-1111-bbbb-2222-cccccccccccc"}'; $response = new ReceiptResponse($unSuccessfulCurlResponse); @@ -43,7 +43,7 @@ public function testCanBeCreated(): ReceiptResponse } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetAcknowledgedBy(ReceiptResponse $response): void { @@ -52,7 +52,7 @@ public function testGetAcknowledgedBy(ReceiptResponse $response): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetAcknowledgedByDevice(ReceiptResponse $response): void { @@ -60,7 +60,7 @@ public function testGetAcknowledgedByDevice(ReceiptResponse $response): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetExpiresAt(ReceiptResponse $response): void { @@ -68,7 +68,7 @@ public function testGetExpiresAt(ReceiptResponse $response): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetLastDeliveredAt(ReceiptResponse $response): void { @@ -76,7 +76,7 @@ public function testGetLastDeliveredAt(ReceiptResponse $response): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testIsAcknowledged(ReceiptResponse $response): void { @@ -84,7 +84,7 @@ public function testIsAcknowledged(ReceiptResponse $response): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetCalledBackAt(ReceiptResponse $response): void { @@ -92,7 +92,7 @@ public function testGetCalledBackAt(ReceiptResponse $response): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetAcknowledgedAt(ReceiptResponse $response): void { @@ -100,7 +100,7 @@ public function testGetAcknowledgedAt(ReceiptResponse $response): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testHasCalledBack(ReceiptResponse $response): void { @@ -108,7 +108,7 @@ public function testHasCalledBack(ReceiptResponse $response): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testIsExpired(ReceiptResponse $response): void { diff --git a/tests/Client/Response/RetrieveGroupResponseTest.php b/tests/Client/Response/RetrieveGroupResponseTest.php index d0c869d..648202f 100644 --- a/tests/Client/Response/RetrieveGroupResponseTest.php +++ b/tests/Client/Response/RetrieveGroupResponseTest.php @@ -19,7 +19,7 @@ class RetrieveGroupResponseTest extends TestCase { - public function testCanBeCreated(): RetrieveGroupResponse + public function testCanBeConstructed(): RetrieveGroupResponse { $unSuccessfulCurlResponse = '{"group":"not found","errors":["group not found or you are not authorized to edit it"],"status":0,"request":"aaaaaaaa-1111-bbbb-2222-cccccccccccc"}'; $response = new RetrieveGroupResponse($unSuccessfulCurlResponse); @@ -40,7 +40,7 @@ public function testCanBeCreated(): RetrieveGroupResponse } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetName(RetrieveGroupResponse $response): void { @@ -48,7 +48,7 @@ public function testGetName(RetrieveGroupResponse $response): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetUsers(RetrieveGroupResponse $response): void { diff --git a/tests/Client/Response/SubscriptionResponseTest.php b/tests/Client/Response/SubscriptionResponseTest.php index 73de33f..3fb67bb 100644 --- a/tests/Client/Response/SubscriptionResponseTest.php +++ b/tests/Client/Response/SubscriptionResponseTest.php @@ -21,7 +21,7 @@ */ class SubscriptionResponseTest extends TestCase { - public function testCanBeCreated(): void + public function testCanBeConstructed(): void { $successfulCurlResponse = '{"subscribed_user_key":"aaaa1111AAAA1111bbbb2222BBBB22","status":1,"request":"aaaaaaaa-1111-bbbb-2222-cccccccccccc"}'; $response = new SubscriptionResponse($successfulCurlResponse); diff --git a/tests/Client/Response/UserGroupValidationResponseTest.php b/tests/Client/Response/UserGroupValidationResponseTest.php index a73d0b4..cb4eddf 100644 --- a/tests/Client/Response/UserGroupValidationResponseTest.php +++ b/tests/Client/Response/UserGroupValidationResponseTest.php @@ -21,7 +21,7 @@ */ class UserGroupValidationResponseTest extends TestCase { - public function testCanBeCreated(): UserGroupValidationResponse + public function testCanBeConstructed(): UserGroupValidationResponse { $unSuccessfulCurlResponse = '{"user":"invalid","errors":["user key is invalid"],"status":0,"request":"aaaaaaaa-1111-bbbb-2222-cccccccccccc"}'; $response = new UserGroupValidationResponse($unSuccessfulCurlResponse); @@ -42,7 +42,7 @@ public function testCanBeCreated(): UserGroupValidationResponse } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetLicenses(UserGroupValidationResponse $response): void { @@ -50,7 +50,7 @@ public function testGetLicenses(UserGroupValidationResponse $response): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetDevices(UserGroupValidationResponse $response): void { @@ -58,7 +58,7 @@ public function testGetDevices(UserGroupValidationResponse $response): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetIsGroup(UserGroupValidationResponse $response): void { diff --git a/tests/Client/SubscriptionClientTest.php b/tests/Client/SubscriptionClientTest.php index 7a442de..e4141ec 100644 --- a/tests/Client/SubscriptionClientTest.php +++ b/tests/Client/SubscriptionClientTest.php @@ -25,7 +25,7 @@ */ class SubscriptionClientTest extends TestCase { - public function testCanBeCreated(): void + public function testCanBeConstructed(): void { $client = new SubscriptionClient(); diff --git a/tests/Client/UserGroupValidationClientTest.php b/tests/Client/UserGroupValidationClientTest.php index dac9669..a901a2d 100644 --- a/tests/Client/UserGroupValidationClientTest.php +++ b/tests/Client/UserGroupValidationClientTest.php @@ -23,7 +23,7 @@ */ class UserGroupValidationClientTest extends TestCase { - public function testCanBeCreated(): UserGroupValidationClient + public function testCanBeConstructed(): UserGroupValidationClient { $client = new UserGroupValidationClient(); @@ -33,7 +33,7 @@ public function testCanBeCreated(): UserGroupValidationClient } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testBuildCurlPostFields(UserGroupValidationClient $client): void { @@ -48,7 +48,7 @@ public function testBuildCurlPostFields(UserGroupValidationClient $client): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testBuildApiUrl(UserGroupValidationClient $client): void { diff --git a/tests/RecipientTest.php b/tests/RecipientTest.php index 28a32ce..dbad88b 100644 --- a/tests/RecipientTest.php +++ b/tests/RecipientTest.php @@ -20,7 +20,7 @@ */ class RecipientTest extends TestCase { - public function testCanBeCreated(): Recipient + public function testCanBeConstructed(): Recipient { $recipient = new Recipient('aaaa1111AAAA1111bbbb2222BBBB22'); $recipient->setIsDisabled(false); @@ -33,14 +33,14 @@ public function testCanBeCreated(): Recipient return $recipient; } - public function testCannotBeCreated(): void + public function testCannotBeConstructed(): void { $this->expectException(InvalidArgumentException::class); new Recipient('Lorem ipsum dolor sit amet'); } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetUserKey(Recipient $recipient): void { @@ -48,7 +48,7 @@ public function testGetUserKey(Recipient $recipient): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetDevice(Recipient $recipient): void { @@ -62,7 +62,7 @@ public function testGetDevice(Recipient $recipient): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetDeviceListCommaSeparated(Recipient $recipient): void { @@ -70,7 +70,7 @@ public function testGetDeviceListCommaSeparated(Recipient $recipient): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testIsDisabled(Recipient $recipient): void { @@ -78,7 +78,7 @@ public function testIsDisabled(Recipient $recipient): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testGetMemo(Recipient $recipient): void { @@ -86,7 +86,7 @@ public function testGetMemo(Recipient $recipient): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetIsDisabled(Recipient $recipient): void { @@ -95,7 +95,7 @@ public function testSetIsDisabled(Recipient $recipient): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testSetMemo(Recipient $recipient): void { @@ -104,7 +104,7 @@ public function testSetMemo(Recipient $recipient): void } /** - * @depends testCanBeCreated + * @depends testCanBeConstructed */ public function testAddDevice(Recipient $recipient): void {