Add PostgreSQL Support (#3)
Reviewed-on: #3
This commit was merged in pull request #3.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Test\Integration\SQLite;
|
||||
|
||||
use BitBadger\PDODocument\{Count, Field, Find, Patch};
|
||||
use BitBadger\PDODocument\{Count, DocumentException, Field, Find, Patch};
|
||||
use PHPUnit\Framework\Attributes\TestDox;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Test\Integration\TestDocument;
|
||||
@@ -44,7 +44,6 @@ class PatchTest extends TestCase
|
||||
$this->assertTrue(true, 'The above not throwing an exception is the test');
|
||||
}
|
||||
|
||||
|
||||
public function testByFieldsSucceedsWhenADocumentIsUpdated(): void
|
||||
{
|
||||
Patch::byFields(ThrowawayDb::TABLE, [Field::EQ('value', 'purple')], ['num_value' => 77]);
|
||||
@@ -57,4 +56,17 @@ class PatchTest extends TestCase
|
||||
Patch::byFields(ThrowawayDb::TABLE, [Field::EQ('value', 'burgundy')], ['foo' => 'green']);
|
||||
$this->assertTrue(true, 'The above not throwing an exception is the test');
|
||||
}
|
||||
|
||||
public function testByContainsFails(): void
|
||||
{
|
||||
$this->expectException(DocumentException::class);
|
||||
Patch::byContains('', [], []);
|
||||
}
|
||||
|
||||
#[TestDox('By JSON Path fails')]
|
||||
public function testByJsonPathFails(): void
|
||||
{
|
||||
$this->expectException(DocumentException::class);
|
||||
Patch::byJsonPath('', '', []);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user