summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/core/Lang_test.php
diff options
context:
space:
mode:
authorHeesung Ahn <ahn.heesung@gmail.com>2015-03-29 19:59:16 +0200
committerHeesung Ahn <ahn.heesung@gmail.com>2015-03-29 19:59:16 +0200
commitcbc21b9bdbaeb2defd47c0808d47801ab1a14ede (patch)
treed138cc58d1d66ae1873dd873905b147f2a70884c /tests/codeigniter/core/Lang_test.php
parent138d0f54fc92ec57f48865850f84594c59b50797 (diff)
Increased code coverage
Signed-off-by:Heesung Ahn <ahn.heesung@gmail.com>
Diffstat (limited to 'tests/codeigniter/core/Lang_test.php')
-rw-r--r--tests/codeigniter/core/Lang_test.php25
1 files changed, 24 insertions, 1 deletions
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,8 +46,31 @@ 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/'));
+ }
+
+ // --------------------------------------------------------------------
/**
* @depends test_load