summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-01-21 15:51:51 +0100
committerAndrey Andreev <narf@devilix.net>2015-01-21 15:51:51 +0100
commitdb669f1de59f7105e0b9cf39899b98fd75b90771 (patch)
tree3393d0465375cc9b3718c20305005a8212b80cba /tests
parenta7e24ecec7b5c86a6016024510853332680fbe84 (diff)
Make libraries matching controller names loadable
Diffstat (limited to 'tests')
-rw-r--r--tests/codeigniter/core/Loader_test.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/codeigniter/core/Loader_test.php b/tests/codeigniter/core/Loader_test.php
index 93ca5b223..9e2092e05 100644
--- a/tests/codeigniter/core/Loader_test.php
+++ b/tests/codeigniter/core/Loader_test.php
@@ -405,12 +405,19 @@ class Loader_test extends CI_TestCase {
// Create model in VFS package path
$dir = 'third-party';
$lib = 'unit_test_package';
- $class = 'CI_'.ucfirst($lib);
+ $class = ucfirst($lib);
$this->ci_vfs_create(ucfirst($lib), '<?php class '.$class.' { }', $this->ci_app_root, array($dir, 'libraries'));
// Get paths
$paths = $this->load->get_package_paths(TRUE);
+ // Test failed load without path
+ $this->setExpectedException(
+ 'RuntimeException',
+ 'CI Error: Unable to load the requested class: '.ucfirst($lib)
+ );
+ $this->load->library($lib);
+
// Add path and verify
$path = APPPATH.$dir.'/';
$this->assertInstanceOf('CI_Loader', $this->load->add_package_path($path));
@@ -432,13 +439,6 @@ class Loader_test extends CI_TestCase {
// Remove path and verify restored paths
$this->assertInstanceOf('CI_Loader', $this->load->remove_package_path($path));
$this->assertEquals($paths, $this->load->get_package_paths(TRUE));
-
- // Test failed load without path
- $this->setExpectedException(
- 'RuntimeException',
- 'CI Error: Unable to load the requested class: '.ucfirst($lib)
- );
- $this->load->library($lib);
}
// --------------------------------------------------------------------