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.

46 lines
1.3 KiB

<?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()
3 weeks ago
->UnlinkWhat("test")
->From($this->TestUUID)
->Build()
);
}
public function test1()
{
self::assertEquals(
expected: "UNLINK test OF {$this->TestUUID}",
actual: QueryBuilder::Unlink()
3 weeks ago
->UnlinkWhat("test")
->Of($this->TestUUID)
->Build()
);
}
public function test2()
{
self::expectException(QueryBuilderConflictingFieldAlreadyExistsException::class);
self::assertEquals(
expected: "UNLINK test FROM {$this->TestUUID}",
actual: QueryBuilder::Unlink()
3 weeks ago
->UnlinkWhat("test")
->From($this->TestUUID)
->Of($this->TestUUID)
->Build()
);
}
}