From 6030719346e9b0eb0e0ea99c679cadeb1fe4afde Mon Sep 17 00:00:00 2001 From: dchill42 Date: Mon, 27 Aug 2012 23:59:31 -0400 Subject: Improved VFS usage in Loader and Config units, added Loader driver test, and moved config load testing to Config unit Signed-off-by: dchill42 --- tests/mocks/core/loader.php | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'tests/mocks') diff --git a/tests/mocks/core/loader.php b/tests/mocks/core/loader.php index 53d88d55b..e28650dba 100644 --- a/tests/mocks/core/loader.php +++ b/tests/mocks/core/loader.php @@ -5,27 +5,31 @@ class Mock_Core_Loader extends CI_Loader { /** * Since we use paths to load up models, views, etc, we need the ability to * mock up the file system so when core tests are run, we aren't mucking - * in the application directory. this will give finer grained control over - * these tests. So yeah, while this looks odd, I need to overwrite protected - * class vars in the loader. So here we go... + * in the application directory. This will give finer grained control over + * these tests. Also, by mocking the system directory, we eliminate dependency + * on any other classes so errors in libraries, helpers, etc. don't give false + * negatives for the actual loading process. So yeah, while this looks odd, + * I need to overwrite protected class vars in the loader. So here we go... * * @covers CI_Loader::__construct() */ public function __construct() { - vfsStreamWrapper::register(); - vfsStreamWrapper::setRoot(new vfsStreamDirectory('application')); + // Create VFS tree of loader locations + $this->root = vfsStream::setup(); + $this->app_root = vfsStream::newDirectory('application')->at($this->root); + $this->base_root = vfsStream::newDirectory('system')->at($this->root); - $this->models_dir = vfsStream::newDirectory('models')->at(vfsStreamWrapper::getRoot()); - $this->libs_dir = vfsStream::newDirectory('libraries')->at(vfsStreamWrapper::getRoot()); - $this->helpers_dir = vfsStream::newDirectory('helpers')->at(vfsStreamWrapper::getRoot()); - $this->views_dir = vfsStream::newDirectory('views')->at(vfsStreamWrapper::getRoot()); + // Get VFS app and base path URLs + $this->app_path = vfsStream::url('application').'/'; + $this->base_path = vfsStream::url('system').'/'; + // Set loader paths with VFS URLs $this->_ci_ob_level = ob_get_level(); - $this->_ci_library_paths = array(vfsStream::url('application').'/', BASEPATH); - $this->_ci_helper_paths = array(vfsStream::url('application').'/', BASEPATH); - $this->_ci_model_paths = array(vfsStream::url('application').'/'); - $this->_ci_view_paths = array(vfsStream::url('application').'/views/' => TRUE); + $this->_ci_library_paths = array($this->app_path, $this->base_path); + $this->_ci_helper_paths = array($this->app_path, $this->base_path); + $this->_ci_model_paths = array($this->app_path); + $this->_ci_view_paths = array($this->app_path.'views/' => TRUE); } -} \ No newline at end of file +} -- cgit v1.2.3-24-g4f1b From 60d100f0fde3fba4fa4015f44f490b7ecac16138 Mon Sep 17 00:00:00 2001 From: dchill42 Date: Wed, 29 Aug 2012 12:58:26 -0400 Subject: Added autoloader unit test with minor supporting change in Loader Signed-off-by: dchill42 --- tests/mocks/core/loader.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/mocks') diff --git a/tests/mocks/core/loader.php b/tests/mocks/core/loader.php index e28650dba..c0e02139e 100644 --- a/tests/mocks/core/loader.php +++ b/tests/mocks/core/loader.php @@ -30,6 +30,15 @@ class Mock_Core_Loader extends CI_Loader { $this->_ci_helper_paths = array($this->app_path, $this->base_path); $this->_ci_model_paths = array($this->app_path); $this->_ci_view_paths = array($this->app_path.'views/' => TRUE); + $this->_ci_autoloader_path = $this->app_path; + } + + /** + * Give public access to _ci_autoloader for testing + */ + public function autoload() + { + $this->_ci_autoloader(); } } -- cgit v1.2.3-24-g4f1b From eeb6a480a4a25b7fe96e9ba0cf3aef273fd13c67 Mon Sep 17 00:00:00 2001 From: dchill42 Date: Thu, 30 Aug 2012 09:46:20 -0400 Subject: Better way - autoloader uses first config path Signed-off-by: dchill42 --- tests/mocks/core/loader.php | 1 - 1 file changed, 1 deletion(-) (limited to 'tests/mocks') diff --git a/tests/mocks/core/loader.php b/tests/mocks/core/loader.php index c0e02139e..9eb78253b 100644 --- a/tests/mocks/core/loader.php +++ b/tests/mocks/core/loader.php @@ -30,7 +30,6 @@ class Mock_Core_Loader extends CI_Loader { $this->_ci_helper_paths = array($this->app_path, $this->base_path); $this->_ci_model_paths = array($this->app_path); $this->_ci_view_paths = array($this->app_path.'views/' => TRUE); - $this->_ci_autoloader_path = $this->app_path; } /** -- cgit v1.2.3-24-g4f1b From 7ecc5cda6647a4b316b44dc40d5925d9ef63c908 Mon Sep 17 00:00:00 2001 From: dchill42 Date: Fri, 12 Oct 2012 16:25:51 -0400 Subject: Integrated vfsStream better and made paths constants VFS-based Signed-off-by: dchill42 --- tests/mocks/autoloader.php | 12 +-- tests/mocks/ci_testcase.php | 192 ++++++++++++++++++++++++++++++++++++++++-- tests/mocks/ci_testconfig.php | 18 ++++ tests/mocks/core/common.php | 26 +++++- tests/mocks/core/loader.php | 30 ------- 5 files changed, 233 insertions(+), 45 deletions(-) create mode 100644 tests/mocks/ci_testconfig.php (limited to 'tests/mocks') 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 diff --git a/tests/mocks/ci_testcase.php b/tests/mocks/ci_testcase.php index eda9e1b60..980e912c5 100644 --- a/tests/mocks/ci_testcase.php +++ b/tests/mocks/ci_testcase.php @@ -2,7 +2,9 @@ class CI_TestCase extends PHPUnit_Framework_TestCase { - protected $ci_config; + public $ci_vfs_root; + public $ci_app_root; + public $ci_base_root; protected $ci_instance; protected static $ci_test_instance; @@ -25,13 +27,18 @@ class CI_TestCase extends PHPUnit_Framework_TestCase { public function __construct() { parent::__construct(); - $this->ci_config = array(); + $this->ci_instance = new StdClass(); } // -------------------------------------------------------------------- public function setUp() { + // Setup VFS with base directories + $this->ci_vfs_root = vfsStream::setup(); + $this->ci_app_root = vfsStream::newDirectory('application')->at($this->ci_vfs_root); + $this->ci_base_root = vfsStream::newDirectory('system')->at($this->ci_vfs_root); + if (method_exists($this, 'set_up')) { $this->set_up(); @@ -57,15 +64,27 @@ class CI_TestCase extends PHPUnit_Framework_TestCase { // -------------------------------------------------------------------- - public function ci_set_config($key, $val = '') + public function ci_set_config($key = '', $val = '') { + // Add test config + if ( ! isset($this->ci_instance->config)) + { + $this->ci_instance->config = new CI_TestConfig(); + } + + // Empty key means just do setup above + if ($key === '') + { + return; + } + if (is_array($key)) { - $this->ci_config = $key; + $this->ci_instance->config->config = $key; } else { - $this->ci_config[$key] = $val; + $this->ci_instance->config->config[$key] = $val; } } @@ -73,7 +92,7 @@ class CI_TestCase extends PHPUnit_Framework_TestCase { public function ci_get_config() { - return $this->ci_config; + return isset($this->ci_instance->config) ? $this->ci_instance->config->config : array(); } // -------------------------------------------------------------------- @@ -132,7 +151,7 @@ class CI_TestCase extends PHPUnit_Framework_TestCase { if ( ! class_exists('CI_'.$class_name)) { - require_once BASEPATH.'core/'.$class_name.'.php'; + require_once SYSTEM_PATH.'core/'.$class_name.'.php'; } $GLOBALS[strtoupper($global_name)] = 'CI_'.$class_name; @@ -148,6 +167,155 @@ class CI_TestCase extends PHPUnit_Framework_TestCase { $orig = $obj; } + /** + * Create VFS directory + * + * @param string Directory name + * @param object Optional root to create in + * @return object New directory object + */ + public function ci_vfs_mkdir($name, $root = NULL) + { + // Check for root + if ( ! $root) + { + $root = $this->ci_vfs_root; + } + + // Return new directory object + return vfsStream::newDirectory($name)->at($root); + } + + // -------------------------------------------------------------------- + + /** + * Create VFS content + * + * @param string File name + * @param string File content + * @param object VFS directory object + * @param mixed Optional subdirectory path or array of subs + * @return void + */ + public function ci_vfs_create($file, $content = '', $root = NULL, $path = NULL) + { + // Check for array + if (is_array($file)) + { + foreach ($file as $name => $content) + { + $this->ci_vfs_create($name, $content, $root, $path); + } + return; + } + + // Assert .php extension if none given + if (pathinfo($file, PATHINFO_EXTENSION) == '') + { + $file .= '.php'; + } + + // Build content + $tree = array($file => $content); + + // Check for path + $subs = array(); + if ($path) + { + // Explode if not array + $subs = is_array($path) ? $path : explode('/', trim($path, '/')); + } + + // Check for root + if ( ! $root) + { + // Use base VFS root + $root = $this->ci_vfs_root; + } + + // Handle subdirectories + while (($dir = array_shift($subs))) + { + // See if subdir exists under current root + $dir_root = $root->getChild($dir); + if ($dir_root) + { + // Yes - recurse into subdir + $root = $dir_root; + } + else + { + // No - put subdirectory back and quit + array_unshift($subs, $dir); + break; + } + } + + // Create any remaining subdirectories + if ($subs) + { + foreach (array_reverse($subs) as $dir) + { + // Wrap content in subdirectory for creation + $tree = array($dir => $tree); + } + } + + // Create tree + vfsStream::create($tree, $root); + } + + // -------------------------------------------------------------------- + + /** + * Clone a real file into VFS + * + * @param string Path from base directory + * @return bool TRUE on success, otherwise FALSE + */ + public function ci_vfs_clone($path) + { + // Get real file contents + $content = file_get_contents(PROJECT_BASE.$path); + if ($content === FALSE) + { + // Couldn't find file to clone + return FALSE; + } + + $this->ci_vfs_create(basename($path), $content, NULL, dirname($path)); + return TRUE; + } + + // -------------------------------------------------------------------- + + /** + * Helper to get a VFS URL path + * + * @param string Path + * @param string Optional base path + * @return string Path URL + */ + public function ci_vfs_path($path, $base = '') + { + // Check for base path + if ($base) + { + // Prepend to path + $path = rtrim($base, '/').'/'.ltrim($path, '/'); + + // Is it already in URL form? + if (strpos($path, '://') !== FALSE) + { + // Done - return path + return $path; + } + } + + // Trim leading slash and return URL + return vfsStream::url(ltrim($path, '/')); + } + // -------------------------------------------------------------------- // Internals // -------------------------------------------------------------------- @@ -171,7 +339,15 @@ class CI_TestCase extends PHPUnit_Framework_TestCase { public function helper($name) { - require_once(BASEPATH.'helpers/'.$name.'_helper.php'); + require_once(SYSTEM_PATH.'helpers/'.$name.'_helper.php'); + } + + // -------------------------------------------------------------------- + + public function lang($name) + { + require(SYSTEM_PATH.'language/english/'.$name.'_lang.php'); + return $lang; } // -------------------------------------------------------------------- diff --git a/tests/mocks/ci_testconfig.php b/tests/mocks/ci_testconfig.php new file mode 100644 index 000000000..eb318ddeb --- /dev/null +++ b/tests/mocks/ci_testconfig.php @@ -0,0 +1,18 @@ +config[$key]) ? $this->config[$key] : FALSE; + } + + public function load($arg1, $arg2, $arg3) + { + return TRUE; + } + +} diff --git a/tests/mocks/core/common.php b/tests/mocks/core/common.php index a655ee1db..b001074c8 100644 --- a/tests/mocks/core/common.php +++ b/tests/mocks/core/common.php @@ -39,6 +39,30 @@ if ( ! function_exists('config_item')) } } +if ( ! function_exists('get_mimes')) +{ + /** + * Returns the MIME types array from config/mimes.php + * + * @return array + */ + function &get_mimes() + { + static $_mimes = array(); + + if (empty($_mimes)) + { + $path = realpath(PROJECT_BASE.'application/config/mimes.php'); + if (is_file($path)) + { + $_mimes = include($path); + } + } + + return $_mimes; + } +} + // -------------------------------------------------------------------- if ( ! function_exists('load_class')) @@ -166,4 +190,4 @@ if ( ! function_exists('set_status_header')) { return TRUE; } -} \ No newline at end of file +} diff --git a/tests/mocks/core/loader.php b/tests/mocks/core/loader.php index 9eb78253b..7ea4da369 100644 --- a/tests/mocks/core/loader.php +++ b/tests/mocks/core/loader.php @@ -2,36 +2,6 @@ class Mock_Core_Loader extends CI_Loader { - /** - * Since we use paths to load up models, views, etc, we need the ability to - * mock up the file system so when core tests are run, we aren't mucking - * in the application directory. This will give finer grained control over - * these tests. Also, by mocking the system directory, we eliminate dependency - * on any other classes so errors in libraries, helpers, etc. don't give false - * negatives for the actual loading process. So yeah, while this looks odd, - * I need to overwrite protected class vars in the loader. So here we go... - * - * @covers CI_Loader::__construct() - */ - public function __construct() - { - // Create VFS tree of loader locations - $this->root = vfsStream::setup(); - $this->app_root = vfsStream::newDirectory('application')->at($this->root); - $this->base_root = vfsStream::newDirectory('system')->at($this->root); - - // Get VFS app and base path URLs - $this->app_path = vfsStream::url('application').'/'; - $this->base_path = vfsStream::url('system').'/'; - - // Set loader paths with VFS URLs - $this->_ci_ob_level = ob_get_level(); - $this->_ci_library_paths = array($this->app_path, $this->base_path); - $this->_ci_helper_paths = array($this->app_path, $this->base_path); - $this->_ci_model_paths = array($this->app_path); - $this->_ci_view_paths = array($this->app_path.'views/' => TRUE); - } - /** * Give public access to _ci_autoloader for testing */ -- cgit v1.2.3-24-g4f1b From e9435dc7e5a4a9779eb83d8adf172fabf47ab5a6 Mon Sep 17 00:00:00 2001 From: dchill42 Date: Sun, 14 Oct 2012 15:44:39 -0400 Subject: Adapted DB for VFS changes and fixed Common case in Bootstrap.php Signed-off-by: dchill42 --- tests/mocks/autoloader.php | 8 +++++++- tests/mocks/ci_testcase.php | 10 ++++++++++ tests/mocks/database/db.php | 45 +++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 60 insertions(+), 3 deletions(-) (limited to 'tests/mocks') 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 diff --git a/tests/mocks/ci_testcase.php b/tests/mocks/ci_testcase.php index 980e912c5..e581d4b02 100644 --- a/tests/mocks/ci_testcase.php +++ b/tests/mocks/ci_testcase.php @@ -275,6 +275,16 @@ class CI_TestCase extends PHPUnit_Framework_TestCase { */ public function ci_vfs_clone($path) { + // Check for array + if (is_array($path)) + { + foreach ($path as $file) + { + $this->ci_vfs_clone($file); + } + return; + } + // Get real file contents $content = file_get_contents(PROJECT_BASE.$path); if ($content === FALSE) diff --git a/tests/mocks/database/db.php b/tests/mocks/database/db.php index 75658530b..7e0030e15 100644 --- a/tests/mocks/database/db.php +++ b/tests/mocks/database/db.php @@ -7,6 +7,16 @@ class Mock_Database_DB { */ private $config = array(); + /** + * @var string DB driver name + */ + private static $dbdriver = ''; + + /** + * @var string DB sub-driver name + */ + private static $subdriver = ''; + /** * Prepare database configuration skeleton * @@ -31,6 +41,12 @@ class Mock_Database_DB { throw new InvalidArgumentException('Group '.$group.' not exists'); } + self::$dbdriver = $this->config[$group]['dbdriver']; + if (isset($this->config[$group]['subdriver'])) + { + self::$subdriver = $this->config[$group]['subdriver']; + } + $params = array( 'dbprefix' => '', 'pconnect' => FALSE, @@ -50,7 +66,7 @@ class Mock_Database_DB { $failover = empty($config['failover']) ? FALSE : $config['failover']; $dsn = $config['dbdriver'].'://'.$config['username'].':'.$config['password'] - .'@'.$config['hostname'].'/'.$config['database']; + .'@'.$config['hostname'].'/'.$config['database']; // Build the parameter $other_params = array_slice($config, 6); @@ -83,7 +99,32 @@ class Mock_Database_DB { */ public static function DB($group, $query_builder = FALSE) { - include_once(BASEPATH.'database/DB.php'); + // Create dummy driver and builder files to "load" - the mocks have + // already triggered autoloading of the real files + $case = CI_TestCase::instance(); + $driver = self::$dbdriver; + $subdriver = self::$subdriver; + $case->ci_vfs_create(array( + 'DB_driver.php' => '', + 'DB_forge.php' => '', + 'DB_query_builder.php' => '' + ), '', $case->ci_base_root, 'database'); + if (file_exists(SYSTEM_PATH.'database/drivers/'.$driver.'/'.$driver.'_driver.php')) + { + $case->ci_vfs_create(array( + $driver.'_driver.php' => '', + $driver.'_forge.php' => '' + ), '', $case->ci_base_root, 'database/drivers/'.$driver); + } + if ($subdriver) + { + $case->ci_vfs_create(array( + $driver.'_'.$subdriver.'_driver.php' => '', + $driver.'_'.$subdriver.'_forge.php' => '' + ), '', $case->ci_base_root, 'database/drivers/'.$driver.'/subdrivers'); + } + + include_once(SYSTEM_PATH.'database/DB.php'); try { -- cgit v1.2.3-24-g4f1b From 4f42be55dc5ca3141f3d93f7f59989d3e52bc5a3 Mon Sep 17 00:00:00 2001 From: dchill42 Date: Sun, 21 Oct 2012 21:31:19 -0400 Subject: Raised CI_Loader test coverage to 93% Signed-off-by: dchill42 --- tests/mocks/ci_testcase.php | 1 + tests/mocks/ci_testconfig.php | 4 +++- tests/mocks/core/common.php | 7 ++++--- tests/mocks/core/loader.php | 13 ------------- tests/mocks/database/schema/skeleton.php | 2 +- 5 files changed, 9 insertions(+), 18 deletions(-) delete mode 100644 tests/mocks/core/loader.php (limited to 'tests/mocks') diff --git a/tests/mocks/ci_testcase.php b/tests/mocks/ci_testcase.php index e581d4b02..f16492945 100644 --- a/tests/mocks/ci_testcase.php +++ b/tests/mocks/ci_testcase.php @@ -38,6 +38,7 @@ class CI_TestCase extends PHPUnit_Framework_TestCase { $this->ci_vfs_root = vfsStream::setup(); $this->ci_app_root = vfsStream::newDirectory('application')->at($this->ci_vfs_root); $this->ci_base_root = vfsStream::newDirectory('system')->at($this->ci_vfs_root); + $this->ci_view_root = vfsStream::newDirectory('views')->at($this->ci_app_root); if (method_exists($this, 'set_up')) { diff --git a/tests/mocks/ci_testconfig.php b/tests/mocks/ci_testconfig.php index eb318ddeb..0c52bb984 100644 --- a/tests/mocks/ci_testconfig.php +++ b/tests/mocks/ci_testconfig.php @@ -4,14 +4,16 @@ class CI_TestConfig { public $config = array(); public $_config_paths = array(APPPATH); + public $loaded = array(); public function item($key) { return isset($this->config[$key]) ? $this->config[$key] : FALSE; } - public function load($arg1, $arg2, $arg3) + public function load($file, $arg2 = FALSE, $arg3 = FALSE) { + $this->loaded[] = $file; return TRUE; } diff --git a/tests/mocks/core/common.php b/tests/mocks/core/common.php index b001074c8..9289b2716 100644 --- a/tests/mocks/core/common.php +++ b/tests/mocks/core/common.php @@ -170,9 +170,10 @@ if ( ! function_exists('is_really_writable')) if ( ! function_exists('is_loaded')) { - function is_loaded() + function &is_loaded() { - throw new Exception('Bad Isolation: mock up environment'); + $loaded = array(); + return $loaded; } } @@ -190,4 +191,4 @@ if ( ! function_exists('set_status_header')) { return TRUE; } -} +} \ No newline at end of file diff --git a/tests/mocks/core/loader.php b/tests/mocks/core/loader.php deleted file mode 100644 index 7ea4da369..000000000 --- a/tests/mocks/core/loader.php +++ /dev/null @@ -1,13 +0,0 @@ -_ci_autoloader(); - } - -} diff --git a/tests/mocks/database/schema/skeleton.php b/tests/mocks/database/schema/skeleton.php index 18e1ddd4d..69e3c187e 100644 --- a/tests/mocks/database/schema/skeleton.php +++ b/tests/mocks/database/schema/skeleton.php @@ -30,7 +30,7 @@ class Mock_Database_Schema_Skeleton { CI_TestCase::instance()->ci_instance_var('db', $db); - $loader = new Mock_Core_Loader(); + $loader = new CI_Loader(); $loader->dbforge(); $forge = CI_TestCase::instance()->ci_instance_var('dbforge'); -- cgit v1.2.3-24-g4f1b