diff options
Diffstat (limited to 'tests/codeigniter')
-rw-r--r-- | tests/codeigniter/core/Lang_test.php | 12 | ||||
-rw-r--r-- | tests/codeigniter/core/Loader_test.php | 19 |
2 files changed, 15 insertions, 16 deletions
diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index 0f6ffd3fa..d2dd7598a 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -46,15 +46,15 @@ class Lang_test extends CI_TestCase { ); $this->lang->load('nonexistent'); } - + // -------------------------------------------------------------------- - + public function test_multiple_file_load() - { + { // Multiple files $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $files = array( - 0 => 'profiler', + 0 => 'profiler', 1 => 'nonexistent' ); $this->setExpectedException( @@ -65,14 +65,14 @@ class Lang_test extends CI_TestCase { } // -------------------------------------------------------------------- - + public function test_alternative_path_load() { // Alternative Path $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $this->assertTrue($this->lang->load('profiler', 'english', FALSE, TRUE, 'vfs://system/')); } - + // -------------------------------------------------------------------- /** diff --git a/tests/codeigniter/core/Loader_test.php b/tests/codeigniter/core/Loader_test.php index 5e64b62b9..cfaf6c74b 100644 --- a/tests/codeigniter/core/Loader_test.php +++ b/tests/codeigniter/core/Loader_test.php @@ -24,7 +24,7 @@ class Loader_test extends CI_TestCase { { // Test getting CI_Loader object $this->assertInstanceOf('CI_Loader', $this->load->library(NULL)); - + // Create library in VFS $lib = 'unit_test_lib'; $class = 'CI_'.ucfirst($lib); @@ -37,10 +37,10 @@ class Loader_test extends CI_TestCase { $this->assertInstanceOf('CI_Loader', $this->load->library(array($lib))); $this->assertTrue(class_exists($class), $class.' does not exist'); $this->assertAttributeInstanceOf($class, $lib, $this->ci_obj); - + // Create library in VFS $lib = array('unit_test_lib' => 'unit_test_lib'); - + // Test loading as an array (int). $this->assertInstanceOf('CI_Loader', $this->load->library($lib)); $this->assertTrue(class_exists($class), $class.' does not exist'); @@ -326,7 +326,7 @@ class Loader_test extends CI_TestCase { $this->assertEquals($val1, $this->load->get_var($key1)); $this->assertEquals(array($key1 => $val1, $key2 => $val2), $this->load->get_vars()); } - + // -------------------------------------------------------------------- public function test_clear_vars() @@ -339,7 +339,7 @@ class Loader_test extends CI_TestCase { $this->assertInstanceOf('CI_Loader', $this->load->vars($key2, $val2)); $this->assertEquals($val1, $this->load->get_var($key1)); $this->assertEquals(array($key1 => $val1, $key2 => $val2), $this->load->get_vars()); - + $this->assertInstanceOf('CI_Loader', $this->load->clear_vars()); $this->assertEquals('', $this->load->get_var($key1)); $this->assertEquals('', $this->load->get_var($key2)); @@ -477,18 +477,18 @@ class Loader_test extends CI_TestCase { $path = APPPATH.$dir.'/'; $path2 = APPPATH.'another/'; $paths = $this->load->get_package_paths(TRUE); - + $this->assertInstanceOf('CI_Loader', $this->load->add_package_path($path)); $this->assertInstanceOf('CI_Loader', $this->load->remove_package_path($path)); $this->assertEquals($paths, $this->load->get_package_paths(TRUE)); - + $this->assertInstanceOf('CI_Loader', $this->load->add_package_path($path2)); $this->assertInstanceOf('CI_Loader', $this->load->remove_package_path()); $this->assertNotContains($path2, $this->load->get_package_paths(TRUE)); } // -------------------------------------------------------------------- - + public function test_load_config() { $cfg = 'someconfig'; @@ -557,5 +557,4 @@ class Loader_test extends CI_TestCase { // Verify config calls $this->assertEquals($cfg['config'], $this->ci_obj->config->loaded); } - -}
\ No newline at end of file +} |