blob: fb40f0608828fbbb851312112498a4ef4bbe3211 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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);
}
}
|