diff --git a/.travis.yml b/.travis.yml index a1635eaa857..0b8965d7776 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ php: env: - DB=mysql + - DB=mysqli - DB=pgsql - DB=sqlite - DB=pdo/mysql diff --git a/tests/codeigniter/database/DB_driver_test.php b/tests/codeigniter/database/DB_driver_test.php index 1f48ca984d9..c04c42b094d 100644 --- a/tests/codeigniter/database/DB_driver_test.php +++ b/tests/codeigniter/database/DB_driver_test.php @@ -21,6 +21,11 @@ protected function mysql($config) return new Mock_Database_Drivers_Mysql($config); } + protected function mysqli($config) + { + return new Mock_Database_Drivers_Mysqli($config); + } + protected function sqlite($config) { return new Mock_Database_Drivers_Sqlite($config); diff --git a/tests/mocks/database/config/mysqli.php b/tests/mocks/database/config/mysqli.php new file mode 100644 index 00000000000..5dd08abb23d --- /dev/null +++ b/tests/mocks/database/config/mysqli.php @@ -0,0 +1,34 @@ + array( + 'dsn' => '', + 'hostname' => 'localhost', + 'username' => 'travis', + 'password' => '', + 'database' => 'ci_test', + 'dbdriver' => 'mysqli' + ), + + // Database configuration with failover + 'mysqli_failover' => array( + 'dsn' => '', + 'hostname' => 'localhost', + 'username' => 'not_travis', + 'password' => 'wrong password', + 'database' => 'not_ci_test', + 'dbdriver' => 'mysqli', + 'failover' => array( + array( + 'dsn' => '', + 'hostname' => 'localhost', + 'username' => 'travis', + 'password' => '', + 'database' => 'ci_test', + 'dbdriver' => 'mysqli', + ) + ) + ) +); \ No newline at end of file diff --git a/tests/mocks/database/drivers/mysqli.php b/tests/mocks/database/drivers/mysqli.php new file mode 100644 index 00000000000..73c35b6099e --- /dev/null +++ b/tests/mocks/database/drivers/mysqli.php @@ -0,0 +1,17 @@ + + + + + + + + + ../codeigniter + + + + + ../../system + + + \ No newline at end of file