Update to PHP 8.4, new option lib
This commit is contained in:
@@ -39,8 +39,8 @@ class RemoveFieldsTest extends TestCase
|
||||
{
|
||||
RemoveFields::byId(ThrowawayDb::TABLE, 'two', ['sub', 'value']);
|
||||
$tryDoc = Find::byId(ThrowawayDb::TABLE, 'two', 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('', $doc->value, 'Value should have been blank (its default value)');
|
||||
$this->assertNull($doc->sub, 'Sub-document should have been null');
|
||||
}
|
||||
@@ -64,8 +64,8 @@ class RemoveFieldsTest extends TestCase
|
||||
{
|
||||
RemoveFields::byFields(ThrowawayDb::TABLE, [Field::equal('num_value', 17)], ['sub']);
|
||||
$doc = Find::firstByFields(ThrowawayDb::TABLE, [Field::equal('num_value', 17)], TestDocument::class);
|
||||
$this->assertTrue($doc->isSome(), 'There should have been a document returned');
|
||||
$this->assertNull($doc->get()->sub, 'Sub-document should have been null');
|
||||
$this->assertTrue($doc->isSome, 'There should have been a document returned');
|
||||
$this->assertNull($doc->value->sub, 'Sub-document should have been null');
|
||||
}
|
||||
|
||||
#[TestDox('byFields() succeeds when a field is not removed')]
|
||||
|
||||
Reference in New Issue
Block a user