From cbc21b9bdbaeb2defd47c0808d47801ab1a14ede Mon Sep 17 00:00:00 2001 From: Heesung Ahn Date: Sun, 29 Mar 2015 13:59:16 -0400 Subject: Increased code coverage Signed-off-by:Heesung Ahn --- tests/codeigniter/core/Lang_test.php | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index 929bc2ffd..3c1e19db3 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -38,7 +38,7 @@ class Lang_test extends CI_TestCase { $this->ci_vfs_clone('system/language/english/number_lang.php'); $this->assertTrue($this->lang->load('number')); $this->assertEquals('Bytes', $this->lang->language['bytes']); - + // Non-existent file $this->setExpectedException( 'RuntimeException', @@ -46,7 +46,30 @@ 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('profiler', 'nonexistent'); + $this->setExpectedException( + 'RuntimeException', + 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' + ); + $this->assertTrue($this->lang->load($files, 'english')); + } + // -------------------------------------------------------------------- + + 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/')); + } + // -------------------------------------------------------------------- /** -- cgit v1.2.3-24-g4f1b