From 73d6e72afcf07edbf4f46fc531cb55ffb491e6f4 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Mon, 9 Dec 2013 20:11:49 -0500 Subject: [PATCH] Improve test coverage of sql driver --- drivers/sqlite/sqlite_driver.php | 7 +------ tests/databases/sqlite/sqlite.php | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/drivers/sqlite/sqlite_driver.php b/drivers/sqlite/sqlite_driver.php index 437aee5..ff373ea 100644 --- a/drivers/sqlite/sqlite_driver.php +++ b/drivers/sqlite/sqlite_driver.php @@ -69,12 +69,7 @@ class SQLite extends DB_PDO { public function get_tables() { $tables = array(); - $sql = <<sql->table_list(); $res = $this->query($sql); return db_filter($res->fetchAll(PDO::FETCH_ASSOC), 'name'); diff --git a/tests/databases/sqlite/sqlite.php b/tests/databases/sqlite/sqlite.php index 1d3aef8..360d63a 100644 --- a/tests/databases/sqlite/sqlite.php +++ b/tests/databases/sqlite/sqlite.php @@ -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); + } } \ No newline at end of file