summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-03-30 18:24:47 +0200
committerAndrey Andreev <narf@devilix.net>2015-03-30 18:24:47 +0200
commit0f38e7406c0b172693b2c3d5b95054be9ddb2b1f (patch)
treeba87a69faa4b66cf838ae9f918afad560431ee99 /tests/codeigniter
parent6074175cd9f4cbae6682199d9574341f0cc02804 (diff)
parent38344dc980a438db8618582e0174a00bdb2fd94c (diff)
Merge pull request #3713 from ahnh/UnitTest_Lang_test
CI_Lang unit tests
Diffstat (limited to 'tests/codeigniter')
-rw-r--r--tests/codeigniter/core/Lang_test.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php
index 929bc2ffd..0f6ffd3fa 100644
--- a/tests/codeigniter/core/Lang_test.php
+++ b/tests/codeigniter/core/Lang_test.php
@@ -46,8 +46,34 @@ 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',
+ 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