Alex Bilbie | 526d88f | 2012-10-16 18:19:30 +0100 | [diff] [blame] | 1 | <?php |
| 2 | |
| 3 | class Language_helper_test extends CI_TestCase { |
| 4 | |
| 5 | public function test_lang() |
| 6 | { |
| 7 | $this->helper('language'); |
Andrey Andreev | 878e23f | 2016-08-10 15:15:49 +0300 | [diff] [blame] | 8 | $lang = $this->getMockBuilder('CI_Lang')->setMethods(array('line'))->getMock(); |
dchill42 | 1713d32 | 2012-11-24 20:23:21 -0500 | [diff] [blame] | 9 | $lang->expects($this->any())->method('line')->will($this->returnValue(FALSE)); |
| 10 | $this->ci_instance_var('lang', $lang); |
Alex Bilbie | 526d88f | 2012-10-16 18:19:30 +0100 | [diff] [blame] | 11 | |
| 12 | $this->assertFalse(lang(1)); |
Andrey Andreev | feb1e05 | 2012-11-26 23:57:04 +0200 | [diff] [blame] | 13 | $this->assertEquals('<label for="foo" class="bar"></label>', lang(1, 'foo', array('class' => 'bar'))); |
Alex Bilbie | 526d88f | 2012-10-16 18:19:30 +0100 | [diff] [blame] | 14 | } |
| 15 | |
Andrey Andreev | 878e23f | 2016-08-10 15:15:49 +0300 | [diff] [blame] | 16 | } |