alpha2 (#2)
- Change multiple field matching to enum - Implement auto-generated IDs Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Test\Unit\Query;
|
||||
|
||||
use BitBadger\PDODocument\{Configuration, Field, Mode};
|
||||
use BitBadger\PDODocument\{Configuration, Field, FieldMatch, Mode};
|
||||
use BitBadger\PDODocument\Query\Find;
|
||||
use PHPUnit\Framework\Attributes\TestDox;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
@@ -32,7 +32,8 @@ class FindTest extends TestCase
|
||||
public function testByFieldsSucceeds(): void
|
||||
{
|
||||
$this->assertEquals("SELECT data FROM there WHERE data->>'active' = :act OR data->>'locked' = :lock",
|
||||
Find::byFields('there', [Field::EQ('active', true, ':act'), Field::EQ('locked', true, ':lock')], 'OR'),
|
||||
Find::byFields('there', [Field::EQ('active', true, ':act'), Field::EQ('locked', true, ':lock')],
|
||||
FieldMatch::Any),
|
||||
'SELECT query not generated correctly');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user