summaryrefslogtreecommitdiffstats
path: root/tests/lib/l10n.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/l10n.php')
-rw-r--r--tests/lib/l10n.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/lib/l10n.php b/tests/lib/l10n.php
index 2235581add8..0307dd459e5 100644
--- a/tests/lib/l10n.php
+++ b/tests/lib/l10n.php
@@ -173,4 +173,20 @@ class Test_L10n extends \Test\TestCase {
array(null, null, 'en'),
);
}
+
+ public function testGetLanguageCode() {
+ $l = OC_L10N::get('lib', 'de');
+ $this->assertEquals('de', $l->getLanguageCode());
+ }
+
+ public function testFactoryGetLanguageCode() {
+ $factory = new \OC\L10N\Factory();
+ $l = $factory->get('lib', 'de');
+ $this->assertEquals('de', $l->getLanguageCode());
+ }
+
+ public function testServiceGetLanguageCode() {
+ $l = \OC::$server->getL10N('lib', 'de');
+ $this->assertEquals('de', $l->getLanguageCode());
+ }
}