fix pgsql tests

This commit is contained in:
Timothy Warren 2012-03-22 16:46:47 -04:00
parent 6c932bf576
commit 6974a04ffd
3 changed files with 23 additions and 5 deletions

View File

@ -89,8 +89,15 @@ SQL;
$res = $this->query($sql);
$tables = $res->fetchAll(PDO::FETCH_ASSOC);
$good_tables = array();
foreach($tables as $t)
{
$good_tables[] = $t['tablename'];
}
return $tables;
return $good_tables;
}
// --------------------------------------------------------------------------

View File

@ -52,9 +52,16 @@ class PgTest extends DBTest {
$this->assertIsA($this->db, 'PgSQL');
}
/*function TestCreateTable()
function TestCreateTable()
{
if (empty($this->db)) return;
// Drop the table(s) if they exist
$sql = 'DROP TABLE IF EXISTS "create_test"';
$this->db->query($sql);
$sql = 'DROP TABLE IF EXISTS "create_join"';
$this->db->query($sql);
//Attempt to create the table
$sql = $this->db->sql->create_table('create_test',
@ -83,12 +90,16 @@ class PgTest extends DBTest {
);
$this->db->query($sql);
echo $sql.'<br />';
//echo $sql.'<br />';
//Reset
unset($this->db);
$this->setUp();
//Check
$dbs = $this->db->get_tables();
print_r($dbs);
$this->assertTrue(in_array('create_test', $dbs));
}*/
}
}

Binary file not shown.