summaryrefslogtreecommitdiff
path: root/tests/units
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2018-11-09 05:46:01 +0100
committerfguillot <fred@kanboard.net>2018-11-08 20:46:01 -0800
commit2674def351e6fd9847376ca069783601c7db45cd (patch)
treee123cc8faba3118ae49f2770f94cff9873cfa96e /tests/units
parent7c2e0f7780207a5e8310a6d7480ff787c1474e5b (diff)
Add the locale en_GB
Diffstat (limited to 'tests/units')
-rw-r--r--tests/units/Model/LanguageTest.php5
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());