diff --git a/src/databases/db_pdo.php b/src/databases/db_pdo.php index a689786..ca8a8e1 100644 --- a/src/databases/db_pdo.php +++ b/src/databases/db_pdo.php @@ -111,7 +111,7 @@ abstract class DB_PDO extends PDO { /** * Abstract functions to override in child classes */ - abstract function get_dbs(){} + abstract function get_dbs(); } // End of db_pdo.php \ No newline at end of file diff --git a/tests/core.php b/tests/core.php new file mode 100644 index 0000000..af31b1d --- /dev/null +++ b/tests/core.php @@ -0,0 +1,69 @@ +assertTrue(version_compare(PHP_VERSION, "5.2", "ge")); + } + + /** + * TestHasPDO function. + * + * @access public + * @return void + */ + function TestHasPDO() + { + // PDO class exists + $this->assertTrue(class_exists('PDO')); + + + // Make sure at least one of the supported drivers is enabled + $supported = array( + 'mysql', + 'pgsql', + 'odbc', + 'sqlite', + ); + + $drivers = pdo_drivers(); + + $num_supported = count(array_intersect($drivers, $supported)); + + $this->assertTrue($num_supported > 0); + } +} \ No newline at end of file diff --git a/tests/databases/firebird.php b/tests/databases/firebird.php new file mode 100644 index 0000000..20887d3 --- /dev/null +++ b/tests/databases/firebird.php @@ -0,0 +1,32 @@ +db = new MySQL(); + } +} + diff --git a/tests/databases/odbc.php b/tests/databases/odbc.php new file mode 100644 index 0000000..ba73a49 --- /dev/null +++ b/tests/databases/odbc.php @@ -0,0 +1,32 @@ +