Skip to content

Commit 7b6d1e9

Browse files
RotzbuaMinishlink
andauthored
feat(tests): use strict assert (#420)
Co-authored-by: Louis Lagrange <[email protected]>
1 parent a2b1c0a commit 7b6d1e9

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.php-cs-fixer.php

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
'@PHP81Migration' => true, // Must be the same as the min PHP version.
88
'blank_line_after_opening_tag' => false, // Do not waste space between <?php and declare.
99
'global_namespace_import' => ['import_classes' => false, 'import_constants' => false, 'import_functions' => false],
10+
'php_unit_construct' => true,
1011
'php_unit_attributes' => true,
1112
'php_unit_method_casing' => true,
1213
'php_unit_test_class_requires_covers' => true,

tests/SubscriptionTest.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ public function testCreateMinimal(): void
1313
];
1414
$subscription = Subscription::create($subscriptionArray);
1515
$this->assertEquals("http://toto.com", $subscription->getEndpoint());
16-
$this->assertEquals(null, $subscription->getPublicKey());
17-
$this->assertEquals(null, $subscription->getAuthToken());
18-
$this->assertEquals(null, $subscription->getContentEncoding());
16+
$this->assertNull($subscription->getPublicKey());
17+
$this->assertNull($subscription->getAuthToken());
18+
$this->assertNull($subscription->getContentEncoding());
1919
}
2020

2121
public function testConstructMinimal(): void
2222
{
2323
$subscription = new Subscription("http://toto.com");
2424
$this->assertEquals("http://toto.com", $subscription->getEndpoint());
25-
$this->assertEquals(null, $subscription->getPublicKey());
26-
$this->assertEquals(null, $subscription->getAuthToken());
27-
$this->assertEquals(null, $subscription->getContentEncoding());
25+
$this->assertNull($subscription->getPublicKey());
26+
$this->assertNull($subscription->getAuthToken());
27+
$this->assertNull($subscription->getContentEncoding());
2828
}
2929

3030
public function testCreatePartial(): void

0 commit comments

Comments
 (0)