summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/core/Lang_test.php
blob: a410dabfa3a488de524a2e2650eb02aa7d848378 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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'));
	}

}