summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/core/Lang_test.php
blob: 3364362e003d4cdd4e463960b493062c73d411a2 (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
33
34
<?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->ci_vfs_clone('system/language/english/profiler_lang.php');
		$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->ci_vfs_clone('system/language/english/profiler_lang.php');
		$this->assertTrue($this->lang->load('profiler'));
		$this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string'));
	}

}