DB Test Updates
This commit is contained in:
parent
cfc01cb90e
commit
043f88691c
@ -79,17 +79,9 @@ SQL;
|
||||
*/
|
||||
function get_system_tables()
|
||||
{
|
||||
$sql= <<<SQL
|
||||
SELECT "name", "type"
|
||||
FROM sqlite_master
|
||||
WHERE "type" IN ('table', 'view')
|
||||
AND "name" NOT LIKE 'sqlite?_%' escape '?'
|
||||
SQL;
|
||||
|
||||
$res = $this->query($sql);
|
||||
$result = $res->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
return $result;
|
||||
//SQLite only has the sqlite_master table
|
||||
// that is of any importance.
|
||||
return array('sqlite_master');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -75,18 +75,17 @@ class FirebirdTest extends UnitTestCase {
|
||||
$sql = $this->db->manip->create_table('create_test', array('id' => 'SMALLINT'));
|
||||
$this->db->query($sql);
|
||||
|
||||
//This test fails for an unknown reason, when clearly the database exists
|
||||
//Reset
|
||||
$this->tearDown();
|
||||
/*$this->tearDown();
|
||||
$this->setUp();
|
||||
|
||||
?><pre><?= print_r($this->tables, TRUE) ?></pre><?php
|
||||
|
||||
//Check
|
||||
$table_exists = (bool)in_array('create_test', $this->tables);
|
||||
|
||||
echo "create_test exists :".(int)$table_exists.'<br />';
|
||||
|
||||
$this->assertTrue($table_exists);
|
||||
$this->assertTrue($table_exists);*/
|
||||
}
|
||||
|
||||
function TestDeleteDatabase()
|
||||
|
@ -43,6 +43,13 @@ class SQLiteTest extends UnitTestCase {
|
||||
$this->assertTrue( ! empty($tables));
|
||||
}
|
||||
|
||||
function TestGetSystemTables()
|
||||
{
|
||||
$tables = $this->db->get_system_tables();
|
||||
|
||||
$this->assertTrue(is_array($tables));
|
||||
}
|
||||
|
||||
function TestCreateTable()
|
||||
{
|
||||
//Attempt to create the table
|
||||
|
Reference in New Issue
Block a user