Improve test coverage of sql driver

This commit is contained in:
Timothy Warren 2013-12-09 20:11:49 -05:00
parent 4678e289aa
commit 73d6e72afc
2 changed files with 21 additions and 6 deletions

View File

@ -69,12 +69,7 @@ class SQLite extends DB_PDO {
public function get_tables()
{
$tables = array();
$sql = <<<SQL
SELECT "name"
FROM "sqlite_master"
WHERE "type"='table'
ORDER BY "name" DESC
SQL;
$sql = $this->sql->table_list();
$res = $this->query($sql);
return db_filter($res->fetchAll(PDO::FETCH_ASSOC), 'name');

View File

@ -200,4 +200,24 @@ SQL;
{
$this->assertFalse($this->db->get_schemas());
}
// --------------------------------------------------------------------------
public function TestNullMethods()
{
$sql = $this->db->sql->system_table_list();
$this->assertEqual(NULL, $sql);
$sql = $this->db->sql->trigger_list();
$this->assertEqual(NULL, $sql);
$sql = $this->db->sql->function_list();
$this->assertEqual(NULL, $sql);
$sql = $this->db->sql->procedure_list();
$this->assertEqual(NULL, $sql);
$sql = $this->db->sql->sequence_list();
$this->assertEqual(NULL, $sql);
}
}