1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 13:12:41 +00:00

Fix session tests

PostgreSQL now passes all tests. Connection and permission errors still
need to be accounted
for before the implementation is complete.
This commit is contained in:
J. King 2018-12-05 12:07:45 -05:00
parent 15301cd7dc
commit 22941f5ad1
2 changed files with 5 additions and 2 deletions

View file

@ -134,7 +134,10 @@ abstract class Base extends \JKingWeb\Arsse\Test\AbstractTest{
public function compareExpectations(array $expected): bool {
foreach ($expected as $table => $info) {
$cols = implode(",", array_keys($info['columns']));
$cols = array_map(function($v) {
return '"'.str_replace('"', '""', $v).'"';
}, array_keys($info['columns']));
$cols = implode(",", $cols);
$types = $info['columns'];
$data = static::$drv->prepare("SELECT $cols from $table")->run()->getAll();
$cols = array_keys($info['columns']);

View file

@ -66,7 +66,7 @@
<testsuite name="Database functions">
<file>cases/Db/SQLite3/TestDatabase.php</file>
<file>cases/Db/SQLite3PDO/TestDatabase.php</file>
<!--<file>cases/Db/PostgreSQL/TestDatabase.php</file>-->
<file>cases/Db/PostgreSQL/TestDatabase.php</file>
</testsuite>
<testsuite name="REST">
<file>cases/REST/TestTarget.php</file>