Skip to content

Commit

Permalink
Merge pull request #8991 from samsonasik/refactor-phpunit-assert-object
Browse files Browse the repository at this point in the history
refactor: using phpunit 10 assertObjectHasNotProperty() and assertObjectHasProperty()
  • Loading branch information
samsonasik authored Jun 23, 2024
2 parents 4e68814 + 3ab0644 commit 61d2742
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/system/Config/BaseConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function testEnvironmentOverrides(): void
// override config with shortPrefix ENV var
$this->assertSame('hubbahubba', $config->delta);
// incorrect env name should not inject property
$this->assertFalse(property_exists($config, 'notthere'));
$this->assertObjectNotHasProperty('notthere', $config);
// empty ENV var should not affect config setting
$this->assertSame('pineapple', $config->fruit);
// non-empty ENV var should overrideconfig setting
Expand Down
2 changes: 1 addition & 1 deletion tests/system/Test/FabricatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ public function testCreateMockSetsDatabaseFields(): void
$this->assertIsInt($result->created_at);
$this->assertIsInt($result->updated_at);

$this->assertTrue(property_exists($result, 'deleted_at'));
$this->assertObjectHasProperty('deleted_at', $result);
$this->assertNull($result->deleted_at);
}

Expand Down

0 comments on commit 61d2742

Please sign in to comment.