diff --git a/autoload.php b/autoload.php index 3f2c570..1846e2c 100644 --- a/autoload.php +++ b/autoload.php @@ -68,7 +68,7 @@ function query_autoload($class) } elseif (is_dir($driver_path)) { - if (in_array($class, pdo_drivers())) + if (in_array($class, PDO::getAvailableDrivers())) { array_map('do_include', glob("{$driver_path}/*.php")); } diff --git a/tests/core/core.php b/tests/core/core.php index 2815c8f..557534c 100644 --- a/tests/core/core.php +++ b/tests/core/core.php @@ -64,7 +64,7 @@ class CoreTest extends UnitTestCase { 'sqlite', ); - $drivers = pdo_drivers(); + $drivers = PDO::getAvailableDrivers(); $num_supported = count(array_intersect($drivers, $supported)); diff --git a/tests/databases/mysql/mysql-qb.php b/tests/databases/mysql/mysql-qb.php index eb67128..6dbbb1f 100644 --- a/tests/databases/mysql/mysql-qb.php +++ b/tests/databases/mysql/mysql-qb.php @@ -43,12 +43,16 @@ class MySQLQBTest extends QBTest { $this->db = new Query_Builder($params); } + else + { + die("Error with mysql credentials"); + } } // -------------------------------------------------------------------------- public function TestExists() { - $this->assertTrue(in_array('mysql', pdo_drivers())); + $this->assertTrue(in_array('mysql', PDO::getAvailableDrivers())); } } \ No newline at end of file diff --git a/tests/databases/mysql/mysql.php b/tests/databases/mysql/mysql.php index d119d3e..4bdd116 100644 --- a/tests/databases/mysql/mysql.php +++ b/tests/databases/mysql/mysql.php @@ -40,7 +40,7 @@ class MySQLTest extends DBTest { public function TestExists() { - $this->assertTrue(in_array('mysql', pdo_drivers())); + $this->assertTrue(in_array('mysql', PDO::getAvailableDrivers())); } // -------------------------------------------------------------------------- diff --git a/tests/db_files/FB_TEST_DB.FDB b/tests/db_files/FB_TEST_DB.FDB index 6a48ead..4914d5f 100644 Binary files a/tests/db_files/FB_TEST_DB.FDB and b/tests/db_files/FB_TEST_DB.FDB differ diff --git a/tests/index.php b/tests/index.php index e685516..17a3826 100644 --- a/tests/index.php +++ b/tests/index.php @@ -37,7 +37,7 @@ require_once(QTEST_DIR . '/core/db_qb_test.php'); $src_path = QBASE_DIR.'drivers/'; $test_path = QTEST_DIR.'/databases/'; -foreach(pdo_drivers() as $d) +foreach(PDO::getAvailableDrivers() as $d) { // PDO firebird isn't stable enough to // bother, so skip it. @@ -48,7 +48,7 @@ foreach(pdo_drivers() as $d) $src_dir = "{$test_path}{$d}"; - if(is_dir($src_dir)) + if (is_dir($src_dir)) { require_once("{$test_path}{$d}/{$d}.php"); require_once("{$test_path}{$d}/{$d}-qb.php");