Permalink
Browse files

Tests

  • Loading branch information...
1 parent 8fdd10e commit 8cef1b0d06581db5cc382fb2fdcc54c960dc2b06 @narfbg narfbg committed Aug 15, 2012
View
6 tests/mocks/autoloader.php
@@ -52,11 +52,11 @@ function autoload($class)
$dir = BASEPATH.'libraries'.DIRECTORY_SEPARATOR;
$class = ($subclass === 'Driver_Library') ? 'Driver' : $subclass;
}
- elseif (preg_match('/^CI_DB_(.+)_(driver|forge|result|utility)$/', $class, $m) && count($m) === 3)
+ elseif (preg_match('/^CI_DB_(native|pdo)_(.+)_(driver|forge|result|utility)$/', $class, $m) && count($m) === 4)
{
$driver_path = BASEPATH.'database'.DIRECTORY_SEPARATOR.'drivers'.DIRECTORY_SEPARATOR;
$dir = $driver_path.$m[1].DIRECTORY_SEPARATOR;
- $file = $dir.$m[1].'_'.$m[2].'.php';
+ $file = $dir.$m[2].'_'.$m[3].'.php';
}
elseif (strpos($class, 'CI_DB') === 0)
{
@@ -69,7 +69,7 @@ function autoload($class)
}
}
- $file = (isset($file)) ? $file : $dir.$class.'.php';
+ $file = isset($file) ? $file : $dir.$class.'.php';
if ( ! file_exists($file))
{
View
2 tests/mocks/database/drivers/mysql.php
@@ -11,7 +11,7 @@ class Mock_Database_Drivers_Mysql extends Mock_Database_DB_Driver {
*/
public function __construct($config = array())
{
- parent::__construct('CI_DB_mysql_driver', $config);
+ parent::__construct('CI_DB_native_mysql_driver', $config);
}
}
View
2 tests/mocks/database/drivers/postgre.php
@@ -11,7 +11,7 @@ class Mock_Database_Drivers_Postgre extends Mock_Database_DB_Driver {
*/
public function __construct($config = array())
{
- parent::__construct('CI_DB_postgre_driver', $config);
+ parent::__construct('CI_DB_native_postgre_driver', $config);
}
}
View
2 tests/mocks/database/drivers/sqlite.php
@@ -11,7 +11,7 @@ class Mock_Database_Drivers_Sqlite extends Mock_Database_DB_Driver {
*/
public function __construct($config = array())
{
- parent::__construct('CI_DB_sqlite3_driver', $config);
+ parent::__construct('CI_DB_native_sqlite3_driver', $config);
}
}

0 comments on commit 8cef1b0

Please sign in to comment.