summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/core/Lang_test.php
diff options
context:
space:
mode:
authorDiederikLascaris <info@runesa.nl>2017-01-22 21:45:15 +0100
committerDiederikLascaris <info@runesa.nl>2017-01-22 21:45:15 +0100
commit312efeba32d532878c536fd28e75f39d61a9dade (patch)
tree71ae4aaca33a9d34a789d6d375acd2594160123a /tests/codeigniter/core/Lang_test.php
parent947f1a06093a52a32b703ee795e52c22cd66363a (diff)
parent44c7af639ac1726780b64fb5a6cb6fca2df8b651 (diff)
Merge branch 'develop' of git://github.com/bcit-ci/CodeIgniter into develop
Diffstat (limited to 'tests/codeigniter/core/Lang_test.php')
-rw-r--r--tests/codeigniter/core/Lang_test.php22
1 files changed, 17 insertions, 5 deletions
diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php
index d2dd7598a..4958f42e1 100644
--- a/tests/codeigniter/core/Lang_test.php
+++ b/tests/codeigniter/core/Lang_test.php
@@ -34,11 +34,6 @@ class Lang_test extends CI_TestCase {
$this->assertTrue($this->lang->load('email', 'german'));
$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');
- $this->assertTrue($this->lang->load('number'));
- $this->assertEquals('Bytes', $this->lang->language['bytes']);
-
// Non-existent file
$this->setExpectedException(
'RuntimeException',
@@ -49,6 +44,23 @@ class Lang_test extends CI_TestCase {
// --------------------------------------------------------------------
+ public function test_non_alpha_idiom()
+ {
+ // Non-alpha idiom (should act the same as unspecified language)
+ // test with existing file
+ $this->ci_vfs_clone('system/language/english/number_lang.php');
+ $this->ci_vfs_clone('system/language/english/number_lang.php', 'system/language/123funny/');
+ $this->assertTrue($this->lang->load('number', '123funny'));
+ $this->assertEquals('Bytes', $this->lang->language['bytes']);
+
+ // test without existing file
+ $this->ci_vfs_clone('system/language/english/email_lang.php');
+ $this->assertTrue($this->lang->load('email', '456funny'));
+ $this->assertEquals('You did not specify a SMTP hostname.', $this->lang->language['email_no_hostname']);
+ }
+
+ // --------------------------------------------------------------------
+
public function test_multiple_file_load()
{
// Multiple files