summaryrefslogtreecommitdiffstats
path: root/tests/lib/l10n
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2016-01-15 16:24:42 +0100
committerJoas Schilling <nickvergessen@owncloud.com>2016-01-26 14:02:31 +0100
commitfe411788b7ee45e2da551fd20aded030b762eecc (patch)
tree9d7ee1611f6649d2f780b5ef707779ec4b552112 /tests/lib/l10n
parentb24b198a83de78c2288482cdf915f15c131653dc (diff)
downloadnextcloud-server-fe411788b7ee45e2da551fd20aded030b762eecc.tar.gz
nextcloud-server-fe411788b7ee45e2da551fd20aded030b762eecc.zip
Remove tests for wrapper
Diffstat (limited to 'tests/lib/l10n')
-rw-r--r--tests/lib/l10n/l10nlegacytest.php43
1 files changed, 0 insertions, 43 deletions
diff --git a/tests/lib/l10n/l10nlegacytest.php b/tests/lib/l10n/l10nlegacytest.php
index f83f6b2b69a..ae84968e65d 100644
--- a/tests/lib/l10n/l10nlegacytest.php
+++ b/tests/lib/l10n/l10nlegacytest.php
@@ -123,49 +123,6 @@ class L10nLegacyTest extends \Test\TestCase {
$this->assertSame($expected, $l->l('firstday', 'firstday'));
}
- /**
- * @dataProvider findLanguageData
- */
- public function testFindLanguage($default, $preference, $expected) {
- \OC_User::setUserId(null);
-
- $config = \OC::$server->getConfig();
- if (is_null($default)) {
- $config->deleteSystemValue('default_language');
- } else {
- $config->setSystemValue('default_language', $default);
- }
- $_SERVER['HTTP_ACCEPT_LANGUAGE'] = $preference;
-
- $reflection = new \ReflectionClass('OC_L10N');
- $prop = $reflection->getProperty('language');
- $prop->setAccessible(1);
- $prop->setValue('');
- $prop->setAccessible(0);
-
- $this->assertSame($expected, OC_L10N::findLanguage());
- }
-
- public function findLanguageData() {
- return array(
- // Exact match
- array(null, 'de-DE,en;q=0.5', 'de_DE'),
- array(null, 'de-DE,en-US;q=0.8,en;q=0.6', 'de_DE'),
-
- // Best match
- array(null, 'de-US,en;q=0.5', 'de'),
- array(null, 'de-US,en-US;q=0.8,en;q=0.6', 'de'),
-
- // The default_language config setting overrides browser preferences.
- array('es_AR', 'de-DE,en;q=0.5', 'es_AR'),
- array('es_AR', 'de-DE,en-US;q=0.8,en;q=0.6', 'es_AR'),
-
- // Worst case default to english
- array(null, '', 'en'),
- array(null, null, 'en'),
- );
- }
-
public function testFactoryGetLanguageCode() {
$factory = new \OC\L10N\Factory($this->getMock('OCP\IConfig'), $this->getMock('OCP\IRequest'));
$l = $factory->get('lib', 'de');