Cerys
4 weeks ago
4 changed files with 44 additions and 6 deletions
@ -0,0 +1,34 @@ |
|||||
|
<?php |
||||
|
|
||||
|
|
||||
|
use Darksparrow\DeegraphInteractions\Exceptions\QueryBuilderConflictingFieldAlreadyExistsException; |
||||
|
use Darksparrow\DeegraphInteractions\QueryBuilder\QueryBuilder; |
||||
|
use PHPUnit\Framework\TestCase; |
||||
|
|
||||
|
|
||||
|
|
||||
|
final class QueryBuilderSelectTest extends TestCase |
||||
|
{ |
||||
|
private string $TestUUID = "{00000000-0000-0000-0000-000000000000}"; |
||||
|
|
||||
|
public function test0() |
||||
|
{ |
||||
|
self::assertEquals( |
||||
|
expected: "SELECT @path FROM ./cases/#", |
||||
|
actual: QueryBuilder::Select() |
||||
|
->RelativePaths(["@path"]) |
||||
|
->From("./cases/#") |
||||
|
->Build() |
||||
|
); |
||||
|
} |
||||
|
public function test1() |
||||
|
{ |
||||
|
self::assertEquals( |
||||
|
expected: "SELECT clients/0/name FROM {0b368d41-7c15-42c8-899c-2b178ae9d983}/cases/0", |
||||
|
actual: QueryBuilder::Select() |
||||
|
->AddRelativePath("clients/0/name") |
||||
|
->From("{0b368d41-7c15-42c8-899c-2b178ae9d983}/cases/0") |
||||
|
->Build() |
||||
|
); |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue