diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/units/Model/LanguageTest.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/units/Model/LanguageTest.php b/tests/units/Model/LanguageTest.php index 88f6df6e..a2d83e85 100644 --- a/tests/units/Model/LanguageTest.php +++ b/tests/units/Model/LanguageTest.php @@ -10,6 +10,7 @@ class LanguageTest extends Base { $codes = LanguageModel::getCodes(); $this->assertContains('fr_FR', $codes); + $this->assertContains('en_GB', $codes); $this->assertContains('en_US', $codes); } @@ -17,6 +18,7 @@ class LanguageTest extends Base { $this->assertSame('', LanguageModel::findCode('xx-XX')); $this->assertSame('fr_FR', LanguageModel::findCode('fr-FR')); + $this->assertSame('en_GB', LanguageModel::findCode('en-GB')); $this->assertSame('en_US', LanguageModel::findCode('en-US')); } @@ -37,6 +39,9 @@ class LanguageTest extends Base $languageModel = new LanguageModel($this->container); $this->assertEquals('en_US', $languageModel->getCurrentLanguage()); + $_SESSION['user'] = array('language' => 'en_GB'); + $this->assertEquals('en_GB', $languageModel->getCurrentLanguage()); + $_SESSION['user'] = array('language' => 'fr_FR'); $this->assertEquals('fr_FR', $languageModel->getCurrentLanguage()); |