Skip to content

Commit 61d2742

Browse files
authored
Merge pull request #8991 from samsonasik/refactor-phpunit-assert-object
refactor: using phpunit 10 assertObjectHasNotProperty() and assertObjectHasProperty()
2 parents 4e68814 + 3ab0644 commit 61d2742

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/system/Config/BaseConfigTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function testEnvironmentOverrides(): void
131131
// override config with shortPrefix ENV var
132132
$this->assertSame('hubbahubba', $config->delta);
133133
// incorrect env name should not inject property
134-
$this->assertFalse(property_exists($config, 'notthere'));
134+
$this->assertObjectNotHasProperty('notthere', $config);
135135
// empty ENV var should not affect config setting
136136
$this->assertSame('pineapple', $config->fruit);
137137
// non-empty ENV var should overrideconfig setting

tests/system/Test/FabricatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ public function testCreateMockSetsDatabaseFields(): void
413413
$this->assertIsInt($result->created_at);
414414
$this->assertIsInt($result->updated_at);
415415

416-
$this->assertTrue(property_exists($result, 'deleted_at'));
416+
$this->assertObjectHasProperty('deleted_at', $result);
417417
$this->assertNull($result->deleted_at);
418418
}
419419

0 commit comments

Comments
 (0)