Skip to content

Commit e4087f2

Browse files
committed
feat(tests): use strict assert
1 parent 9c9623b commit e4087f2

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.php-cs-fixer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
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],
1010
'php_unit_test_class_requires_covers' => true,
11+
'php_unit_construct' => true,
1112
'php_unit_method_casing' => true,
1213
// Do not enable by default. These rules require review!! (but they are useful)
1314
// '@PHP80Migration:risky' => true,

tests/SubscriptionTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ public function testCreateMinimal(): void
1414
];
1515
$subscription = Subscription::create($subscriptionArray);
1616
$this->assertEquals("http://toto.com", $subscription->getEndpoint());
17-
$this->assertEquals(null, $subscription->getPublicKey());
18-
$this->assertEquals(null, $subscription->getAuthToken());
19-
$this->assertEquals(null, $subscription->getContentEncoding());
17+
$this->assertNull($subscription->getPublicKey());
18+
$this->assertNull($subscription->getAuthToken());
19+
$this->assertNull($subscription->getContentEncoding());
2020
}
2121

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

3131
public function testCreatePartial(): void

0 commit comments

Comments
 (0)