3 require_once 'application/Languages.php';
8 class LanguagesTest
extends PHPUnit_Framework_TestCase
11 * Test t() with a simple non identified value.
13 public function testTranslateSingleNotID()
15 $text = 'abcdé 564 fgK';
16 $this->assertEquals($text, t($text));
20 * Test t() with a non identified plural form.
22 public function testTranslatePluralNotID()
24 $text = '%s sandwich';
25 $nText = '%s sandwiches';
26 $this->assertEquals('0 sandwich', t($text, $nText));
27 $this->assertEquals('1 sandwich', t($text, $nText, 1));
28 $this->assertEquals('2 sandwiches', t($text, $nText, 2));
32 * Test t() with a non identified invalid plural form.
34 public function testTranslatePluralNotIDInvalid()
37 $nText = 'sandwiches';
38 $this->assertEquals('sandwich', t($text, $nText, 1));
39 $this->assertEquals('sandwiches', t($text, $nText, 2));