Add mode, bring in definition/patch queries
This commit is contained in:
@@ -4,6 +4,7 @@ namespace Test\Unit;
|
||||
|
||||
use BitBadger\PDODocument\Field;
|
||||
use BitBadger\PDODocument\Query;
|
||||
use PHPUnit\Framework\Attributes\TestDox;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
@@ -37,11 +38,13 @@ class QueryTest extends TestCase
|
||||
'WHERE fragment not constructed correctly');
|
||||
}
|
||||
|
||||
#[TestDox('Where by ID succeeds with default parameter')]
|
||||
public function testWhereByIdSucceedsWithDefaultParameter(): void
|
||||
{
|
||||
$this->assertEquals("data->>'id' = @id", Query::whereById(), 'WHERE fragment not constructed correctly');
|
||||
}
|
||||
|
||||
#[TestDox('Where by ID succeeds with specific parameter')]
|
||||
public function testWhereByIdSucceedsWithSpecificParameter(): void
|
||||
{
|
||||
$this->assertEquals("data->>'id' = @di", Query::whereById('@di'), 'WHERE fragment not constructed correctly');
|
||||
|
||||
Reference in New Issue
Block a user