Skip to content

refactor: using phpunit 10 assertObjectHasNotProperty() and assertObjectHasProperty() #8991

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
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
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 @@
$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 Expand Up @@ -493,7 +493,7 @@
$this->assertSame(0, Fabricator::getCount('giants'));
}

public function testUniqueSetsOutUniqueFieldValues(): void

Check warning on line 496 in tests/system/Test/FabricatorTest.php

View workflow job for this annotation

GitHub Actions / Others (8.2) / Sanity Tests

Took 0.6239s from 0.5000s limit to run CodeIgniter\\Test\\FabricatorTest::testUniqueSetsOutUniqueFieldValues
{
$model = new class () extends Model {
protected $allowedFields = ['email'];
Expand Down Expand Up @@ -528,7 +528,7 @@
);
}

public function testValidSetsOutValidValuesUsingCallback(): void

Check warning on line 531 in tests/system/Test/FabricatorTest.php

View workflow job for this annotation

GitHub Actions / Others (8.2) / Sanity Tests

Took 0.7216s from 0.5000s limit to run CodeIgniter\\Test\\FabricatorTest::testValidSetsOutValidValuesUsingCallback
{
$model = new class () extends Model {
protected $allowedFields = ['digit'];
Expand Down
Loading