summaryrefslogtreecommitdiffstats
path: root/tests/mocks/autoloader.php
diff options
context:
space:
mode:
authordchill42 <dchill42@gmail.com>2012-10-14 21:44:39 +0200
committerdchill42 <dchill42@gmail.com>2012-10-14 23:28:26 +0200
commite9435dc7e5a4a9779eb83d8adf172fabf47ab5a6 (patch)
tree5e1f5a24c6ee9f4e72a0970e4392223265d1f02a /tests/mocks/autoloader.php
parent93ec20b8d9afbf8cb22ec6383b7fb24fe70330e8 (diff)
Adapted DB for VFS changes and fixed Common case in Bootstrap.php
Signed-off-by: dchill42 <dchill42@gmail.com>
Diffstat (limited to 'tests/mocks/autoloader.php')
-rw-r--r--tests/mocks/autoloader.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/mocks/autoloader.php b/tests/mocks/autoloader.php
index 431c310d4..5b202f159 100644
--- a/tests/mocks/autoloader.php
+++ b/tests/mocks/autoloader.php
@@ -65,6 +65,12 @@ function autoload($class)
$dir = SYSTEM_PATH.'libraries'.DIRECTORY_SEPARATOR.$parent.DIRECTORY_SEPARATOR.'drivers'.DIRECTORY_SEPARATOR;
$class = $subclass;
}
+ elseif (preg_match('/^CI_DB_(.+)_(.+)_(driver|forge|result|utility)$/', $class, $m) && count($m) === 4)
+ {
+ $driver_path = SYSTEM_PATH.'database'.DIRECTORY_SEPARATOR.'drivers'.DIRECTORY_SEPARATOR;
+ $dir = $driver_path.$m[1].DIRECTORY_SEPARATOR.'subdrivers'.DIRECTORY_SEPARATOR;
+ $file = $dir.$m[1].'_'.$m[2].'_'.$m[3].'.php';
+ }
elseif (preg_match('/^CI_DB_(.+)_(driver|forge|result|utility)$/', $class, $m) && count($m) === 3)
{
$driver_path = SYSTEM_PATH.'database'.DIRECTORY_SEPARATOR.'drivers'.DIRECTORY_SEPARATOR;
@@ -104,4 +110,4 @@ function autoload($class)
}
include_once($file);
-}
+} \ No newline at end of file