diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 9fccf94..e041068 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -7,6 +7,7 @@ '@PHP81Migration' => true, // Must be the same as the min PHP version. 'blank_line_after_opening_tag' => false, // Do not waste space between ['import_classes' => false, 'import_constants' => false, 'import_functions' => false], + 'php_unit_construct' => true, 'php_unit_attributes' => true, 'php_unit_method_casing' => true, 'php_unit_test_class_requires_covers' => true, diff --git a/tests/SubscriptionTest.php b/tests/SubscriptionTest.php index 43787df..e57c3b5 100644 --- a/tests/SubscriptionTest.php +++ b/tests/SubscriptionTest.php @@ -13,18 +13,18 @@ public function testCreateMinimal(): void ]; $subscription = Subscription::create($subscriptionArray); $this->assertEquals("http://toto.com", $subscription->getEndpoint()); - $this->assertEquals(null, $subscription->getPublicKey()); - $this->assertEquals(null, $subscription->getAuthToken()); - $this->assertEquals(null, $subscription->getContentEncoding()); + $this->assertNull($subscription->getPublicKey()); + $this->assertNull($subscription->getAuthToken()); + $this->assertNull($subscription->getContentEncoding()); } public function testConstructMinimal(): void { $subscription = new Subscription("http://toto.com"); $this->assertEquals("http://toto.com", $subscription->getEndpoint()); - $this->assertEquals(null, $subscription->getPublicKey()); - $this->assertEquals(null, $subscription->getAuthToken()); - $this->assertEquals(null, $subscription->getContentEncoding()); + $this->assertNull($subscription->getPublicKey()); + $this->assertNull($subscription->getAuthToken()); + $this->assertNull($subscription->getContentEncoding()); } public function testCreatePartial(): void