Update to PHP 8.4, new option lib

This commit is contained in:
2024-09-30 23:39:23 -04:00
parent df436c9ef4
commit 4b29345dc7
16 changed files with 151 additions and 151 deletions

View File

@@ -39,8 +39,8 @@ class PatchTest extends TestCase
{
Patch::byId(ThrowawayDb::TABLE, 'one', ['num_value' => 44]);
$doc = Find::byId(ThrowawayDb::TABLE, 'one', TestDocument::class);
$this->assertTrue($doc->isSome(), 'There should have been a document returned');
$this->assertEquals(44, $doc->get()->num_value, 'The updated document is not correct');
$this->assertTrue($doc->isSome, 'There should have been a document returned');
$this->assertEquals(44, $doc->value->num_value, 'The updated document is not correct');
}
#[TestDox('byId() succeeds when no document is updated')]
@@ -74,8 +74,8 @@ class PatchTest extends TestCase
{
Patch::byContains(ThrowawayDb::TABLE, ['value' => 'another'], ['num_value' => 12]);
$tryDoc = Find::firstByContains(ThrowawayDb::TABLE, ['value' => 'another'], TestDocument::class);
$this->assertTrue($tryDoc->isSome(), 'There should have been a document returned');
$doc = $tryDoc->get();
$this->assertTrue($tryDoc->isSome, 'There should have been a document returned');
$doc = $tryDoc->value;
$this->assertEquals('two', $doc->id, 'An incorrect document was returned');
$this->assertEquals(12, $doc->num_value, 'The document was not patched');
}