Skip to content

feat(tests): use strict assert #420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <?php and declare.
'global_namespace_import' => ['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,
Expand Down
12 changes: 6 additions & 6 deletions tests/SubscriptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down