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

@ -90,7 +90,14 @@ SQL;
$tables = $res->fetchAll(PDO::FETCH_ASSOC);
return $tables;
$good_tables = array();
foreach($tables as $t)
{
$good_tables[] = $t['tablename'];
}
return $good_tables;
}
// --------------------------------------------------------------------------

View File

@ -52,10 +52,17 @@ 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',
array(
@ -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.