@@ -34,11 +34,6 @@ public function test_load()
34
34
$ this ->assertTrue ($ this ->lang ->load ('email ' , 'german ' ));
35
35
$ this ->assertEquals ('german ' , $ this ->lang ->is_loaded ['email_lang.php ' ]);
36
36
37
- // Non-alpha idiom (should act the same as unspecified language)
38
- $ this ->ci_vfs_clone ('system/language/english/number_lang.php ' );
39
- $ this ->assertTrue ($ this ->lang ->load ('number ' ));
40
- $ this ->assertEquals ('Bytes ' , $ this ->lang ->language ['bytes ' ]);
41
-
42
37
// Non-existent file
43
38
$ this ->setExpectedException (
44
39
'RuntimeException ' ,
@@ -49,6 +44,23 @@ public function test_load()
49
44
50
45
// --------------------------------------------------------------------
51
46
47
+ public function test_non_alpha_idiom ()
48
+ {
49
+ // Non-alpha idiom (should act the same as unspecified language)
50
+ // test with existing file
51
+ $ this ->ci_vfs_clone ('system/language/english/number_lang.php ' );
52
+ $ this ->ci_vfs_clone ('system/language/english/number_lang.php ' , 'system/language/123funny/ ' );
53
+ $ this ->assertTrue ($ this ->lang ->load ('number ' , '123funny ' ));
54
+ $ this ->assertEquals ('Bytes ' , $ this ->lang ->language ['bytes ' ]);
55
+
56
+ // test without existing file
57
+ $ this ->ci_vfs_clone ('system/language/english/email_lang.php ' );
58
+ $ this ->assertTrue ($ this ->lang ->load ('email ' , '456funny ' ));
59
+ $ this ->assertEquals ('You did not specify a SMTP hostname. ' , $ this ->lang ->language ['email_no_hostname ' ]);
60
+ }
61
+
62
+ // --------------------------------------------------------------------
63
+
52
64
public function test_multiple_file_load ()
53
65
{
54
66
// Multiple files
0 commit comments