diff options
author | Timothy Warren <tim@timshomepage.net> | 2012-04-26 23:34:05 +0200 |
---|---|---|
committer | Timothy Warren <tim@timshomepage.net> | 2012-04-26 23:34:05 +0200 |
commit | f59bb1ac944dfaed23150ffd452ce5bca9f5f5c0 (patch) | |
tree | d48f5d570c9f1696997aabb863507d5854e8af50 /tests/codeigniter/database/DB_driver_test.php | |
parent | 96ddee29ef2d2deac9bfb91f7d508efca09ee70f (diff) | |
parent | 8ebd1b7a21dec212be7ba0be51ce671f45b389ca (diff) |
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into patch
Diffstat (limited to 'tests/codeigniter/database/DB_driver_test.php')
-rw-r--r-- | tests/codeigniter/database/DB_driver_test.php | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/codeigniter/database/DB_driver_test.php b/tests/codeigniter/database/DB_driver_test.php new file mode 100644 index 000000000..fb40f0608 --- /dev/null +++ b/tests/codeigniter/database/DB_driver_test.php @@ -0,0 +1,36 @@ +<?php + +class DB_driver_test extends CI_TestCase { + + // ------------------------------------------------------------------------ + + public function test_initialize() + { + $config = Mock_Database_DB::config(DB_DRIVER); + $driver_name = current(explode('/', DB_DRIVER)); + $driver = $this->$driver_name($config[DB_DRIVER]); + + $this->assertTrue($driver->initialize()); + } + + protected function pdo($config) + { + return new Mock_Database_Drivers_PDO($config); + } + + protected function mysql($config) + { + return new Mock_Database_Drivers_Mysql($config); + } + + protected function sqlite($config) + { + return new Mock_Database_Drivers_Sqlite($config); + } + + protected function pgsql($config) + { + return new Mock_Database_Drivers_Postgre($config); + } + +}
\ No newline at end of file |