You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
989 B
35 lines
989 B
4 weeks ago
|
<?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()
|
||
|
);
|
||
|
}
|
||
|
}
|