summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/core/Lang_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codeigniter/core/Lang_test.php')
-rw-r--r--tests/codeigniter/core/Lang_test.php29
1 files changed, 27 insertions, 2 deletions
diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php
index 87a71c885..d2dd7598a 100644
--- a/tests/codeigniter/core/Lang_test.php
+++ b/tests/codeigniter/core/Lang_test.php
@@ -32,7 +32,7 @@ class Lang_test extends CI_TestCase {
// A language other than english
$this->ci_vfs_clone('system/language/english/email_lang.php', 'system/language/german/');
$this->assertTrue($this->lang->load('email', 'german'));
- $this->assertEquals('german', $this->lang->is_loaded['email_lang.php'] );
+ $this->assertEquals('german', $this->lang->is_loaded['email_lang.php']);
// Non-alpha idiom (should act the same as unspecified language)
$this->ci_vfs_clone('system/language/english/number_lang.php');
@@ -49,6 +49,32 @@ class Lang_test extends CI_TestCase {
// --------------------------------------------------------------------
+ public function test_multiple_file_load()
+ {
+ // Multiple files
+ $this->ci_vfs_clone('system/language/english/profiler_lang.php');
+ $files = array(
+ 0 => 'profiler',
+ 1 => 'nonexistent'
+ );
+ $this->setExpectedException(
+ 'RuntimeException',
+ 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php'
+ );
+ $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
*/
@@ -60,5 +86,4 @@ class Lang_test extends CI_TestCase {
$this->assertFalse($this->lang->line('nonexistent_string'));
$this->assertFalse($this->lang->line(NULL));
}
-
}