Add SQLite Patch integration tests

- Use multiple-class use statements
This commit is contained in:
2024-06-07 23:06:31 -04:00
parent 1ab961e35a
commit 9fba3781d6
21 changed files with 143 additions and 67 deletions

View File

@@ -2,13 +2,8 @@
namespace Test\Integration\SQLite;
use BitBadger\PDODocument\Count;
use BitBadger\PDODocument\Custom;
use BitBadger\PDODocument\DocumentException;
use BitBadger\PDODocument\Mapper\CountMapper;
use BitBadger\PDODocument\Mapper\DocumentMapper;
use BitBadger\PDODocument\Mapper\StringMapper;
use BitBadger\PDODocument\Query;
use BitBadger\PDODocument\{Count, Custom, DocumentException, Query};
use BitBadger\PDODocument\Mapper\{CountMapper, DocumentMapper};
use PHPUnit\Framework\TestCase;
use Test\Integration\TestDocument;
@@ -105,12 +100,8 @@ class CustomTest extends TestCase
public function testNonQuerySucceedsWhenOperatingOnData()
{
Custom::nonQuery('DELETE FROM ' . ThrowawayDb::TABLE, []);
try {
$remaining = Count::all(ThrowawayDb::TABLE);
$this->assertEquals(0, $remaining, 'There should be no documents remaining in the table');
} finally {
$this->dbName = ThrowawayDb::exchange($this->dbName);
}
$remaining = Count::all(ThrowawayDb::TABLE);
$this->assertEquals(0, $remaining, 'There should be no documents remaining in the table');
}
public function testNonQuerySucceedsWhenNoDataMatchesWhereClause()