Add a test of what everyone thinks should be the result of this method

This commit is contained in:
Joas Schilling 2015-03-02 18:01:17 +01:00
parent 29ecbc8c6c
commit 5fc004f8ea
1 changed files with 16 additions and 0 deletions

View File

@ -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());
}
}