Add mode, bring in definition/patch queries

This commit is contained in:
2024-06-03 21:09:03 -04:00
parent ecc13a30cf
commit 98bfceb7c9
10 changed files with 219 additions and 7 deletions

View File

@@ -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');