summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/core/Lang_test.php
diff options
context:
space:
mode:
authordchill42 <dchill42@gmail.com>2012-07-23 16:53:47 +0200
committerdchill42 <dchill42@gmail.com>2012-07-23 16:53:47 +0200
commitc5079de78e5141330c07e990811ef15e998e95aa (patch)
tree0f39d8c4fc7614246fc185810bfeaa7fad88a33a /tests/codeigniter/core/Lang_test.php
parent00fcb545109d4e61bc14e403ec828749c34a54b3 (diff)
parentede49ba66b127535f3430e20aac72ceed2c4611a (diff)
Merge branch develop of github.com:/EllisLab/CodeIgniter into session
Diffstat (limited to 'tests/codeigniter/core/Lang_test.php')
-rw-r--r--tests/codeigniter/core/Lang_test.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php
new file mode 100644
index 000000000..a410dabfa
--- /dev/null
+++ b/tests/codeigniter/core/Lang_test.php
@@ -0,0 +1,32 @@
+<?php
+
+class Lang_test extends CI_TestCase {
+
+ protected $lang;
+
+ public function set_up()
+ {
+ $loader_cls = $this->ci_core_class('load');
+ $this->ci_instance_var('load', new $loader_cls);
+
+ $cls = $this->ci_core_class('lang');
+ $this->lang = new $cls;
+ }
+
+ // --------------------------------------------------------------------
+
+ public function test_load()
+ {
+ $this->assertTrue($this->lang->load('profiler', 'english'));
+ $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string'));
+ }
+
+ // --------------------------------------------------------------------
+
+ public function test_load_with_unspecified_language()
+ {
+ $this->assertTrue($this->lang->load('profiler'));
+ $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string'));
+ }
+
+} \ No newline at end of file