diff options
author | dchill42 <dchill42@gmail.com> | 2012-10-12 22:25:51 +0200 |
---|---|---|
committer | dchill42 <dchill42@gmail.com> | 2012-10-12 22:25:51 +0200 |
commit | 7ecc5cda6647a4b316b44dc40d5925d9ef63c908 (patch) | |
tree | e0d0e0c57bb911fc9690db4a85014b7a72e32300 /tests/mocks/autoloader.php | |
parent | 2716398bd2f2ae36d7420c591fc759e0951ba0e2 (diff) |
Integrated vfsStream better and made paths constants VFS-based
Signed-off-by: dchill42 <dchill42@gmail.com>
Diffstat (limited to 'tests/mocks/autoloader.php')
-rw-r--r-- | tests/mocks/autoloader.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/mocks/autoloader.php b/tests/mocks/autoloader.php index 88d016bba..431c310d4 100644 --- a/tests/mocks/autoloader.php +++ b/tests/mocks/autoloader.php @@ -48,32 +48,32 @@ function autoload($class) if (in_array($subclass, $ci_core)) { - $dir = BASEPATH.'core'.DIRECTORY_SEPARATOR; + $dir = SYSTEM_PATH.'core'.DIRECTORY_SEPARATOR; $class = $subclass; } elseif (in_array($subclass, $ci_libraries)) { - $dir = BASEPATH.'libraries'.DIRECTORY_SEPARATOR; + $dir = SYSTEM_PATH.'libraries'.DIRECTORY_SEPARATOR; $class = ($subclass === 'Driver_Library') ? 'Driver' : $subclass; } elseif (in_array($subclass, $ci_drivers)) { - $dir = BASEPATH.'libraries'.DIRECTORY_SEPARATOR.$subclass.DIRECTORY_SEPARATOR; + $dir = SYSTEM_PATH.'libraries'.DIRECTORY_SEPARATOR.$subclass.DIRECTORY_SEPARATOR; $class = $subclass; } elseif (in_array(($parent = strtok($subclass, '_')), $ci_drivers)) { - $dir = BASEPATH.'libraries'.DIRECTORY_SEPARATOR.$parent.DIRECTORY_SEPARATOR.'drivers'.DIRECTORY_SEPARATOR; + $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) === 3) { - $driver_path = BASEPATH.'database'.DIRECTORY_SEPARATOR.'drivers'.DIRECTORY_SEPARATOR; + $driver_path = SYSTEM_PATH.'database'.DIRECTORY_SEPARATOR.'drivers'.DIRECTORY_SEPARATOR; $dir = $driver_path.$m[1].DIRECTORY_SEPARATOR; $file = $dir.$m[1].'_'.$m[2].'.php'; } elseif (strpos($class, 'CI_DB') === 0) { - $dir = BASEPATH.'database'.DIRECTORY_SEPARATOR; + $dir = SYSTEM_PATH.'database'.DIRECTORY_SEPARATOR; $file = $dir.str_replace(array('CI_DB','active_record'), array('DB', 'active_rec'), $subclass).'.php'; } else |