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.
49 lines
1.4 KiB
49 lines
1.4 KiB
4 weeks ago
|
<?php
|
||
|
|
||
|
|
||
|
use Darksparrow\DeegraphInteractions\Exceptions\QueryBuilderConflictingFieldAlreadyExistsException;
|
||
|
use Darksparrow\DeegraphInteractions\QueryBuilder\QueryBuilder;
|
||
|
use PHPUnit\Framework\TestCase;
|
||
|
|
||
|
|
||
|
|
||
|
final class QueryBuilderUnlinkTest extends TestCase
|
||
|
{
|
||
|
private string $TestUUID = "{00000000-0000-0000-0000-000000000000}";
|
||
|
|
||
|
public function test0()
|
||
|
{
|
||
|
self::assertEquals(
|
||
|
expected: "UNLINK test FROM {$this->TestUUID}",
|
||
|
actual: QueryBuilder::Unlink()
|
||
|
->PropertyName("test")
|
||
|
->From()
|
||
|
->RelativePath($this->TestUUID)
|
||
|
->Build()
|
||
|
);
|
||
|
}
|
||
|
public function test1()
|
||
|
{
|
||
|
self::assertEquals(
|
||
|
expected: "UNLINK test OF {$this->TestUUID}",
|
||
|
actual: QueryBuilder::Unlink()
|
||
|
->PropertyName("test")
|
||
|
->Of()
|
||
|
->RelativePath($this->TestUUID)
|
||
|
->Build()
|
||
|
);
|
||
|
}
|
||
|
public function test2()
|
||
|
{
|
||
|
self::expectException(QueryBuilderConflictingFieldAlreadyExistsException::class);
|
||
|
self::assertEquals(
|
||
|
expected: "UNLINK test FROM {$this->TestUUID}",
|
||
|
actual: QueryBuilder::Unlink()
|
||
|
->PropertyName("test")
|
||
|
->From()
|
||
|
->Of()
|
||
|
->RelativePath($this->TestUUID)
|
||
|
->Build()
|
||
|
);
|
||
|
}
|
||
|
}
|