Finish tests

- Add sub-doc handling for SQLite fields
- Add casting for PostgreSQL BT on numeric value
- Add hasItems() to DocumentList
- Fix SQL syntax problems exposed by tests
This commit is contained in:
2024-06-08 10:49:52 -04:00
parent a96fdf9d14
commit 2d8f8b6e87
21 changed files with 691 additions and 42 deletions

View File

@@ -2,7 +2,7 @@
namespace Test\Unit;
use BitBadger\PDODocument\{Field, Query};
use BitBadger\PDODocument\{Configuration, Field, Mode, Query};
use PHPUnit\Framework\Attributes\TestDox;
use PHPUnit\Framework\TestCase;
@@ -11,6 +11,16 @@ use PHPUnit\Framework\TestCase;
*/
class QueryTest extends TestCase
{
protected function setUp(): void
{
Configuration::$mode = Mode::SQLite;
}
protected function tearDown(): void
{
Configuration::$mode = null;
}
public function testSelectFromTableSucceeds(): void
{
$this->assertEquals('SELECT data FROM testing', Query::selectFromTable('testing'),