Update to PHP 8.4, new option lib
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user