Browse Source

Fix session tests

PostgreSQL now passes all tests. Connection and permission errors still
need to be accounted
for before the implementation is complete.
microsub
J. King 5 years ago
parent
commit
22941f5ad1
  1. 5
      tests/cases/Database/Base.php
  2. 2
      tests/phpunit.xml

5
tests/cases/Database/Base.php

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

2
tests/phpunit.xml

@ -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>

Loading…
Cancel
Save