summaryrefslogtreecommitdiff
path: root/tests/phpunit/languages
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:30:02 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:30:02 -0400
commit1de335ad3f395ca6861085393ba366a9e3fb4a0d (patch)
treef1fdd326034e05177596851be6a7127615d81498 /tests/phpunit/languages
parent9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff)
parentf6d65e533c62f6deb21342d4901ece24497b433e (diff)
Merge commit 'f6d65'
# Conflicts: # skins/ArchLinux/ArchLinux.php
Diffstat (limited to 'tests/phpunit/languages')
-rw-r--r--tests/phpunit/languages/LanguageConverterTest.php187
-rw-r--r--tests/phpunit/languages/SpecialPageAliasTest.php1
-rw-r--r--tests/phpunit/languages/classes/LanguageAmTest.php (renamed from tests/phpunit/languages/LanguageAmTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageArTest.php (renamed from tests/phpunit/languages/LanguageArTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageArqTest.php (renamed from tests/phpunit/languages/LanguageArqTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageBeTest.php (renamed from tests/phpunit/languages/LanguageBeTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageBe_taraskTest.php (renamed from tests/phpunit/languages/LanguageBe_taraskTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageBhoTest.php (renamed from tests/phpunit/languages/LanguageBhoTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageBsTest.php (renamed from tests/phpunit/languages/LanguageBsTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageCsTest.php (renamed from tests/phpunit/languages/LanguageCsTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageCuTest.php (renamed from tests/phpunit/languages/LanguageCuTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageCyTest.php (renamed from tests/phpunit/languages/LanguageCyTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageDsbTest.php (renamed from tests/phpunit/languages/LanguageDsbTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageFrTest.php (renamed from tests/phpunit/languages/LanguageFrTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageGaTest.php (renamed from tests/phpunit/languages/LanguageGaTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageGdTest.php (renamed from tests/phpunit/languages/LanguageGdTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageGvTest.php (renamed from tests/phpunit/languages/LanguageGvTest.php)2
-rw-r--r--tests/phpunit/languages/classes/LanguageHeTest.php (renamed from tests/phpunit/languages/LanguageHeTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageHiTest.php (renamed from tests/phpunit/languages/LanguageHiTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageHrTest.php (renamed from tests/phpunit/languages/LanguageHrTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageHsbTest.php (renamed from tests/phpunit/languages/LanguageHsbTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageHuTest.php (renamed from tests/phpunit/languages/LanguageHuTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageHyTest.php (renamed from tests/phpunit/languages/LanguageHyTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageKshTest.php (renamed from tests/phpunit/languages/LanguageKshTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageLnTest.php (renamed from tests/phpunit/languages/LanguageLnTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageLtTest.php (renamed from tests/phpunit/languages/LanguageLtTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageLvTest.php (renamed from tests/phpunit/languages/LanguageLvTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageMgTest.php (renamed from tests/phpunit/languages/LanguageMgTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageMkTest.php (renamed from tests/phpunit/languages/LanguageMkTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageMlTest.php (renamed from tests/phpunit/languages/LanguageMlTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageMoTest.php (renamed from tests/phpunit/languages/LanguageMoTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageMtTest.php (renamed from tests/phpunit/languages/LanguageMtTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageNlTest.php (renamed from tests/phpunit/languages/LanguageNlTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageNsoTest.php (renamed from tests/phpunit/languages/LanguageNsoTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguagePlTest.php (renamed from tests/phpunit/languages/LanguagePlTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageRoTest.php (renamed from tests/phpunit/languages/LanguageRoTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageRuTest.php (renamed from tests/phpunit/languages/LanguageRuTest.php)14
-rw-r--r--tests/phpunit/languages/classes/LanguageSeTest.php (renamed from tests/phpunit/languages/LanguageSeTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageSgsTest.php (renamed from tests/phpunit/languages/LanguageSgsTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageShTest.php (renamed from tests/phpunit/languages/LanguageShTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageSkTest.php (renamed from tests/phpunit/languages/LanguageSkTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageSlTest.php (renamed from tests/phpunit/languages/LanguageSlTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageSmaTest.php (renamed from tests/phpunit/languages/LanguageSmaTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageSrTest.php (renamed from tests/phpunit/languages/LanguageSrTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageTiTest.php (renamed from tests/phpunit/languages/LanguageTiTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageTlTest.php (renamed from tests/phpunit/languages/LanguageTlTest.php)4
-rw-r--r--tests/phpunit/languages/classes/LanguageTrTest.php (renamed from tests/phpunit/languages/LanguageTrTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageUkTest.php (renamed from tests/phpunit/languages/LanguageUkTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageUzTest.php (renamed from tests/phpunit/languages/LanguageUzTest.php)0
-rw-r--r--tests/phpunit/languages/classes/LanguageWaTest.php (renamed from tests/phpunit/languages/LanguageWaTest.php)0
50 files changed, 198 insertions, 10 deletions
diff --git a/tests/phpunit/languages/LanguageConverterTest.php b/tests/phpunit/languages/LanguageConverterTest.php
new file mode 100644
index 00000000..d4ccca99
--- /dev/null
+++ b/tests/phpunit/languages/LanguageConverterTest.php
@@ -0,0 +1,187 @@
+<?php
+
+class LanguageConverterTest extends MediaWikiLangTestCase {
+ /** @var LanguageToTest */
+ protected $lang = null;
+ /** @var TestConverter */
+ protected $lc = null;
+
+ protected function setUp() {
+ parent::setUp();
+
+ $this->setMwGlobals( array(
+ 'wgContLang' => Language::factory( 'tg' ),
+ 'wgLanguageCode' => 'tg',
+ 'wgDefaultLanguageVariant' => false,
+ 'wgMemc' => new EmptyBagOStuff,
+ 'wgRequest' => new FauxRequest( array() ),
+ 'wgUser' => new User,
+ ) );
+
+ $this->lang = new LanguageToTest();
+ $this->lc = new TestConverter(
+ $this->lang, 'tg',
+ array( 'tg', 'tg-latn' )
+ );
+ }
+
+ protected function tearDown() {
+ unset( $this->lc );
+ unset( $this->lang );
+
+ parent::tearDown();
+ }
+
+ /**
+ * @covers LanguageConverter::getPreferredVariant
+ */
+ public function testGetPreferredVariantDefaults() {
+ $this->assertEquals( 'tg', $this->lc->getPreferredVariant() );
+ }
+
+ /**
+ * @covers LanguageConverter::getPreferredVariant
+ * @covers LanguageConverter::getHeaderVariant
+ */
+ public function testGetPreferredVariantHeaders() {
+ global $wgRequest;
+ $wgRequest->setHeader( 'Accept-Language', 'tg-latn' );
+
+ $this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
+ }
+
+ /**
+ * @covers LanguageConverter::getPreferredVariant
+ * @covers LanguageConverter::getHeaderVariant
+ */
+ public function testGetPreferredVariantHeaderWeight() {
+ global $wgRequest;
+ $wgRequest->setHeader( 'Accept-Language', 'tg;q=1' );
+
+ $this->assertEquals( 'tg', $this->lc->getPreferredVariant() );
+ }
+
+ /**
+ * @covers LanguageConverter::getPreferredVariant
+ * @covers LanguageConverter::getHeaderVariant
+ */
+ public function testGetPreferredVariantHeaderWeight2() {
+ global $wgRequest;
+ $wgRequest->setHeader( 'Accept-Language', 'tg-latn;q=1' );
+
+ $this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
+ }
+
+ /**
+ * @covers LanguageConverter::getPreferredVariant
+ * @covers LanguageConverter::getHeaderVariant
+ */
+ public function testGetPreferredVariantHeaderMulti() {
+ global $wgRequest;
+ $wgRequest->setHeader( 'Accept-Language', 'en, tg-latn;q=1' );
+
+ $this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
+ }
+
+ /**
+ * @covers LanguageConverter::getPreferredVariant
+ */
+ public function testGetPreferredVariantUserOption() {
+ global $wgUser;
+
+ $wgUser = new User;
+ $wgUser->load(); // from 'defaults'
+ $wgUser->mId = 1;
+ $wgUser->mDataLoaded = true;
+ $wgUser->mOptionsLoaded = true;
+ $wgUser->setOption( 'variant', 'tg-latn' );
+
+ $this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
+ }
+
+ /**
+ * @covers LanguageConverter::getPreferredVariant
+ * @covers LanguageConverter::getUserVariant
+ */
+ public function testGetPreferredVariantUserOptionForForeignLanguage() {
+ global $wgContLang, $wgUser;
+
+ $wgContLang = Language::factory( 'en' );
+ $wgUser = new User;
+ $wgUser->load(); // from 'defaults'
+ $wgUser->mId = 1;
+ $wgUser->mDataLoaded = true;
+ $wgUser->mOptionsLoaded = true;
+ $wgUser->setOption( 'variant-tg', 'tg-latn' );
+
+ $this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
+ }
+
+ /**
+ * @covers LanguageConverter::getPreferredVariant
+ * @covers LanguageConverter::getUserVariant
+ * @covers LanguageConverter::getURLVariant
+ */
+ public function testGetPreferredVariantHeaderUserVsUrl() {
+ global $wgContLang, $wgRequest, $wgUser;
+
+ $wgContLang = Language::factory( 'tg-latn' );
+ $wgRequest->setVal( 'variant', 'tg' );
+ $wgUser = User::newFromId( "admin" );
+ $wgUser->setId( 1 );
+ $wgUser->mFrom = 'defaults';
+ $wgUser->mOptionsLoaded = true;
+ // The user's data is ignored because the variant is set in the URL.
+ $wgUser->setOption( 'variant', 'tg-latn' );
+ $this->assertEquals( 'tg', $this->lc->getPreferredVariant() );
+ }
+
+ /**
+ * @covers LanguageConverter::getPreferredVariant
+ */
+ public function testGetPreferredVariantDefaultLanguageVariant() {
+ global $wgDefaultLanguageVariant;
+
+ $wgDefaultLanguageVariant = 'tg-latn';
+ $this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
+ }
+
+ /**
+ * @covers LanguageConverter::getPreferredVariant
+ * @covers LanguageConverter::getURLVariant
+ */
+ public function testGetPreferredVariantDefaultLanguageVsUrlVariant() {
+ global $wgDefaultLanguageVariant, $wgRequest, $wgContLang;
+
+ $wgContLang = Language::factory( 'tg-latn' );
+ $wgDefaultLanguageVariant = 'tg';
+ $wgRequest->setVal( 'variant', null );
+ $this->assertEquals( 'tg', $this->lc->getPreferredVariant() );
+ }
+}
+
+/**
+ * Test converter (from Tajiki to latin orthography)
+ */
+class TestConverter extends LanguageConverter {
+ private $table = array(
+ 'б' => 'b',
+ 'в' => 'v',
+ 'г' => 'g',
+ );
+
+ function loadDefaultTables() {
+ $this->mTables = array(
+ 'tg-latn' => new ReplacementArray( $this->table ),
+ 'tg' => new ReplacementArray()
+ );
+ }
+}
+
+class LanguageToTest extends Language {
+ function __construct() {
+ parent::__construct();
+ $variants = array( 'tg', 'tg-latn' );
+ $this->mConverter = new TestConverter( $this, 'tg', $variants );
+ }
+}
diff --git a/tests/phpunit/languages/SpecialPageAliasTest.php b/tests/phpunit/languages/SpecialPageAliasTest.php
index f6d6bc96..a6d9d270 100644
--- a/tests/phpunit/languages/SpecialPageAliasTest.php
+++ b/tests/phpunit/languages/SpecialPageAliasTest.php
@@ -8,7 +8,6 @@
* @group SystemTest
* @group medium
*
- * @licence GNU GPL v2+
* @author Katie Filbert < aude.wiki@gmail.com >
*/
class SpecialPageAliasTest extends MediaWikiTestCase {
diff --git a/tests/phpunit/languages/LanguageAmTest.php b/tests/phpunit/languages/classes/LanguageAmTest.php
index a644f5e0..a644f5e0 100644
--- a/tests/phpunit/languages/LanguageAmTest.php
+++ b/tests/phpunit/languages/classes/LanguageAmTest.php
diff --git a/tests/phpunit/languages/LanguageArTest.php b/tests/phpunit/languages/classes/LanguageArTest.php
index 7b48f236..7b48f236 100644
--- a/tests/phpunit/languages/LanguageArTest.php
+++ b/tests/phpunit/languages/classes/LanguageArTest.php
diff --git a/tests/phpunit/languages/LanguageArqTest.php b/tests/phpunit/languages/classes/LanguageArqTest.php
index 3fa56d78..3fa56d78 100644
--- a/tests/phpunit/languages/LanguageArqTest.php
+++ b/tests/phpunit/languages/classes/LanguageArqTest.php
diff --git a/tests/phpunit/languages/LanguageBeTest.php b/tests/phpunit/languages/classes/LanguageBeTest.php
index 7bd586af..7bd586af 100644
--- a/tests/phpunit/languages/LanguageBeTest.php
+++ b/tests/phpunit/languages/classes/LanguageBeTest.php
diff --git a/tests/phpunit/languages/LanguageBe_taraskTest.php b/tests/phpunit/languages/classes/LanguageBe_taraskTest.php
index 4dd5cdd7..4dd5cdd7 100644
--- a/tests/phpunit/languages/LanguageBe_taraskTest.php
+++ b/tests/phpunit/languages/classes/LanguageBe_taraskTest.php
diff --git a/tests/phpunit/languages/LanguageBhoTest.php b/tests/phpunit/languages/classes/LanguageBhoTest.php
index 187bfbbc..187bfbbc 100644
--- a/tests/phpunit/languages/LanguageBhoTest.php
+++ b/tests/phpunit/languages/classes/LanguageBhoTest.php
diff --git a/tests/phpunit/languages/LanguageBsTest.php b/tests/phpunit/languages/classes/LanguageBsTest.php
index 7aca2ab1..7aca2ab1 100644
--- a/tests/phpunit/languages/LanguageBsTest.php
+++ b/tests/phpunit/languages/classes/LanguageBsTest.php
diff --git a/tests/phpunit/languages/LanguageCsTest.php b/tests/phpunit/languages/classes/LanguageCsTest.php
index da9e6b88..da9e6b88 100644
--- a/tests/phpunit/languages/LanguageCsTest.php
+++ b/tests/phpunit/languages/classes/LanguageCsTest.php
diff --git a/tests/phpunit/languages/LanguageCuTest.php b/tests/phpunit/languages/classes/LanguageCuTest.php
index 07193172..07193172 100644
--- a/tests/phpunit/languages/LanguageCuTest.php
+++ b/tests/phpunit/languages/classes/LanguageCuTest.php
diff --git a/tests/phpunit/languages/LanguageCyTest.php b/tests/phpunit/languages/classes/LanguageCyTest.php
index eaf663a8..eaf663a8 100644
--- a/tests/phpunit/languages/LanguageCyTest.php
+++ b/tests/phpunit/languages/classes/LanguageCyTest.php
diff --git a/tests/phpunit/languages/LanguageDsbTest.php b/tests/phpunit/languages/classes/LanguageDsbTest.php
index 94c11bcc..94c11bcc 100644
--- a/tests/phpunit/languages/LanguageDsbTest.php
+++ b/tests/phpunit/languages/classes/LanguageDsbTest.php
diff --git a/tests/phpunit/languages/LanguageFrTest.php b/tests/phpunit/languages/classes/LanguageFrTest.php
index 46b65011..46b65011 100644
--- a/tests/phpunit/languages/LanguageFrTest.php
+++ b/tests/phpunit/languages/classes/LanguageFrTest.php
diff --git a/tests/phpunit/languages/LanguageGaTest.php b/tests/phpunit/languages/classes/LanguageGaTest.php
index c009f56b..c009f56b 100644
--- a/tests/phpunit/languages/LanguageGaTest.php
+++ b/tests/phpunit/languages/classes/LanguageGaTest.php
diff --git a/tests/phpunit/languages/LanguageGdTest.php b/tests/phpunit/languages/classes/LanguageGdTest.php
index b89b4df9..b89b4df9 100644
--- a/tests/phpunit/languages/LanguageGdTest.php
+++ b/tests/phpunit/languages/classes/LanguageGdTest.php
diff --git a/tests/phpunit/languages/LanguageGvTest.php b/tests/phpunit/languages/classes/LanguageGvTest.php
index fc58022a..e6a0cf07 100644
--- a/tests/phpunit/languages/LanguageGvTest.php
+++ b/tests/phpunit/languages/classes/LanguageGvTest.php
@@ -37,7 +37,7 @@ class LanguageGvTest extends LanguageClassesTestCase {
array( 'other', 23 ),
array( 'other', 50 ),
array( 'few', 60 ),
- array( 'other', 80 ),
+ array( 'few', 80 ),
array( 'few', 100 )
);
}
diff --git a/tests/phpunit/languages/LanguageHeTest.php b/tests/phpunit/languages/classes/LanguageHeTest.php
index c382244f..c382244f 100644
--- a/tests/phpunit/languages/LanguageHeTest.php
+++ b/tests/phpunit/languages/classes/LanguageHeTest.php
diff --git a/tests/phpunit/languages/LanguageHiTest.php b/tests/phpunit/languages/classes/LanguageHiTest.php
index f6d2c9e9..f6d2c9e9 100644
--- a/tests/phpunit/languages/LanguageHiTest.php
+++ b/tests/phpunit/languages/classes/LanguageHiTest.php
diff --git a/tests/phpunit/languages/LanguageHrTest.php b/tests/phpunit/languages/classes/LanguageHrTest.php
index 644c5255..644c5255 100644
--- a/tests/phpunit/languages/LanguageHrTest.php
+++ b/tests/phpunit/languages/classes/LanguageHrTest.php
diff --git a/tests/phpunit/languages/LanguageHsbTest.php b/tests/phpunit/languages/classes/LanguageHsbTest.php
index f95a43bf..f95a43bf 100644
--- a/tests/phpunit/languages/LanguageHsbTest.php
+++ b/tests/phpunit/languages/classes/LanguageHsbTest.php
diff --git a/tests/phpunit/languages/LanguageHuTest.php b/tests/phpunit/languages/classes/LanguageHuTest.php
index ee9197d7..ee9197d7 100644
--- a/tests/phpunit/languages/LanguageHuTest.php
+++ b/tests/phpunit/languages/classes/LanguageHuTest.php
diff --git a/tests/phpunit/languages/LanguageHyTest.php b/tests/phpunit/languages/classes/LanguageHyTest.php
index 92e0ef94..92e0ef94 100644
--- a/tests/phpunit/languages/LanguageHyTest.php
+++ b/tests/phpunit/languages/classes/LanguageHyTest.php
diff --git a/tests/phpunit/languages/LanguageKshTest.php b/tests/phpunit/languages/classes/LanguageKshTest.php
index 568a3780..568a3780 100644
--- a/tests/phpunit/languages/LanguageKshTest.php
+++ b/tests/phpunit/languages/classes/LanguageKshTest.php
diff --git a/tests/phpunit/languages/LanguageLnTest.php b/tests/phpunit/languages/classes/LanguageLnTest.php
index 10b3234f..10b3234f 100644
--- a/tests/phpunit/languages/LanguageLnTest.php
+++ b/tests/phpunit/languages/classes/LanguageLnTest.php
diff --git a/tests/phpunit/languages/LanguageLtTest.php b/tests/phpunit/languages/classes/LanguageLtTest.php
index 30642f62..30642f62 100644
--- a/tests/phpunit/languages/LanguageLtTest.php
+++ b/tests/phpunit/languages/classes/LanguageLtTest.php
diff --git a/tests/phpunit/languages/LanguageLvTest.php b/tests/phpunit/languages/classes/LanguageLvTest.php
index 7120cfe3..7120cfe3 100644
--- a/tests/phpunit/languages/LanguageLvTest.php
+++ b/tests/phpunit/languages/classes/LanguageLvTest.php
diff --git a/tests/phpunit/languages/LanguageMgTest.php b/tests/phpunit/languages/classes/LanguageMgTest.php
index 65e8fd7b..65e8fd7b 100644
--- a/tests/phpunit/languages/LanguageMgTest.php
+++ b/tests/phpunit/languages/classes/LanguageMgTest.php
diff --git a/tests/phpunit/languages/LanguageMkTest.php b/tests/phpunit/languages/classes/LanguageMkTest.php
index ed155263..ed155263 100644
--- a/tests/phpunit/languages/LanguageMkTest.php
+++ b/tests/phpunit/languages/classes/LanguageMkTest.php
diff --git a/tests/phpunit/languages/LanguageMlTest.php b/tests/phpunit/languages/classes/LanguageMlTest.php
index 4fa45ce3..4fa45ce3 100644
--- a/tests/phpunit/languages/LanguageMlTest.php
+++ b/tests/phpunit/languages/classes/LanguageMlTest.php
diff --git a/tests/phpunit/languages/LanguageMoTest.php b/tests/phpunit/languages/classes/LanguageMoTest.php
index e0e54ca8..e0e54ca8 100644
--- a/tests/phpunit/languages/LanguageMoTest.php
+++ b/tests/phpunit/languages/classes/LanguageMoTest.php
diff --git a/tests/phpunit/languages/LanguageMtTest.php b/tests/phpunit/languages/classes/LanguageMtTest.php
index 96d2bc92..96d2bc92 100644
--- a/tests/phpunit/languages/LanguageMtTest.php
+++ b/tests/phpunit/languages/classes/LanguageMtTest.php
diff --git a/tests/phpunit/languages/LanguageNlTest.php b/tests/phpunit/languages/classes/LanguageNlTest.php
index 26bd691a..26bd691a 100644
--- a/tests/phpunit/languages/LanguageNlTest.php
+++ b/tests/phpunit/languages/classes/LanguageNlTest.php
diff --git a/tests/phpunit/languages/LanguageNsoTest.php b/tests/phpunit/languages/classes/LanguageNsoTest.php
index 18efd736..18efd736 100644
--- a/tests/phpunit/languages/LanguageNsoTest.php
+++ b/tests/phpunit/languages/classes/LanguageNsoTest.php
diff --git a/tests/phpunit/languages/LanguagePlTest.php b/tests/phpunit/languages/classes/LanguagePlTest.php
index d180037b..d180037b 100644
--- a/tests/phpunit/languages/LanguagePlTest.php
+++ b/tests/phpunit/languages/classes/LanguagePlTest.php
diff --git a/tests/phpunit/languages/LanguageRoTest.php b/tests/phpunit/languages/classes/LanguageRoTest.php
index ae7816bc..ae7816bc 100644
--- a/tests/phpunit/languages/LanguageRoTest.php
+++ b/tests/phpunit/languages/classes/LanguageRoTest.php
diff --git a/tests/phpunit/languages/LanguageRuTest.php b/tests/phpunit/languages/classes/LanguageRuTest.php
index f64fc722..1381afbf 100644
--- a/tests/phpunit/languages/LanguageRuTest.php
+++ b/tests/phpunit/languages/classes/LanguageRuTest.php
@@ -13,7 +13,7 @@ class LanguageRuTest extends LanguageClassesTestCase {
* @covers Language::convertPlural
*/
public function testPlural( $result, $value ) {
- $forms = array( 'one', 'many', 'other' );
+ $forms = array( 'one', 'few', 'many', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
@@ -22,9 +22,9 @@ class LanguageRuTest extends LanguageClassesTestCase {
* @covers Language::convertPlural
*/
public function testExplicitPlural() {
- $forms = array( 'one', 'many', 'other', '12=dozen' );
+ $forms = array( 'one', 'few', 'many', 'other', '12=dozen' );
$this->assertEquals( 'dozen', $this->getLang()->convertPlural( 12, $forms ) );
- $forms = array( 'one', 'many', '100=hundred', 'other', '12=dozen' );
+ $forms = array( 'one', 'few', 'many', '100=hundred', 'other', '12=dozen' );
$this->assertEquals( 'hundred', $this->getLang()->convertPlural( 100, $forms ) );
}
@@ -42,10 +42,10 @@ class LanguageRuTest extends LanguageClassesTestCase {
array( 'many', 11 ),
array( 'one', 91 ),
array( 'one', 121 ),
- array( 'other', 2 ),
- array( 'other', 3 ),
- array( 'other', 4 ),
- array( 'other', 334 ),
+ array( 'few', 2 ),
+ array( 'few', 3 ),
+ array( 'few', 4 ),
+ array( 'few', 334 ),
array( 'many', 5 ),
array( 'many', 15 ),
array( 'many', 120 ),
diff --git a/tests/phpunit/languages/LanguageSeTest.php b/tests/phpunit/languages/classes/LanguageSeTest.php
index 533aa2bc..533aa2bc 100644
--- a/tests/phpunit/languages/LanguageSeTest.php
+++ b/tests/phpunit/languages/classes/LanguageSeTest.php
diff --git a/tests/phpunit/languages/LanguageSgsTest.php b/tests/phpunit/languages/classes/LanguageSgsTest.php
index fa49a4dd..fa49a4dd 100644
--- a/tests/phpunit/languages/LanguageSgsTest.php
+++ b/tests/phpunit/languages/classes/LanguageSgsTest.php
diff --git a/tests/phpunit/languages/LanguageShTest.php b/tests/phpunit/languages/classes/LanguageShTest.php
index 1b390872..1b390872 100644
--- a/tests/phpunit/languages/LanguageShTest.php
+++ b/tests/phpunit/languages/classes/LanguageShTest.php
diff --git a/tests/phpunit/languages/LanguageSkTest.php b/tests/phpunit/languages/classes/LanguageSkTest.php
index cb8a13b8..cb8a13b8 100644
--- a/tests/phpunit/languages/LanguageSkTest.php
+++ b/tests/phpunit/languages/classes/LanguageSkTest.php
diff --git a/tests/phpunit/languages/LanguageSlTest.php b/tests/phpunit/languages/classes/LanguageSlTest.php
index 9783dd80..9783dd80 100644
--- a/tests/phpunit/languages/LanguageSlTest.php
+++ b/tests/phpunit/languages/classes/LanguageSlTest.php
diff --git a/tests/phpunit/languages/LanguageSmaTest.php b/tests/phpunit/languages/classes/LanguageSmaTest.php
index 95cb333c..95cb333c 100644
--- a/tests/phpunit/languages/LanguageSmaTest.php
+++ b/tests/phpunit/languages/classes/LanguageSmaTest.php
diff --git a/tests/phpunit/languages/LanguageSrTest.php b/tests/phpunit/languages/classes/LanguageSrTest.php
index bfb199f3..bfb199f3 100644
--- a/tests/phpunit/languages/LanguageSrTest.php
+++ b/tests/phpunit/languages/classes/LanguageSrTest.php
diff --git a/tests/phpunit/languages/LanguageTiTest.php b/tests/phpunit/languages/classes/LanguageTiTest.php
index e225af97..e225af97 100644
--- a/tests/phpunit/languages/LanguageTiTest.php
+++ b/tests/phpunit/languages/classes/LanguageTiTest.php
diff --git a/tests/phpunit/languages/LanguageTlTest.php b/tests/phpunit/languages/classes/LanguageTlTest.php
index 7ac51c69..20f5bd7f 100644
--- a/tests/phpunit/languages/LanguageTlTest.php
+++ b/tests/phpunit/languages/classes/LanguageTlTest.php
@@ -28,7 +28,9 @@ class LanguageTlTest extends LanguageClassesTestCase {
return array(
array( 'one', 0 ),
array( 'one', 1 ),
- array( 'other', 2 ),
+ array( 'one', 2 ),
+ array( 'other', 4 ),
+ array( 'other', 6 ),
);
}
}
diff --git a/tests/phpunit/languages/LanguageTrTest.php b/tests/phpunit/languages/classes/LanguageTrTest.php
index 2c9905f7..2c9905f7 100644
--- a/tests/phpunit/languages/LanguageTrTest.php
+++ b/tests/phpunit/languages/classes/LanguageTrTest.php
diff --git a/tests/phpunit/languages/LanguageUkTest.php b/tests/phpunit/languages/classes/LanguageUkTest.php
index 9051bcff..9051bcff 100644
--- a/tests/phpunit/languages/LanguageUkTest.php
+++ b/tests/phpunit/languages/classes/LanguageUkTest.php
diff --git a/tests/phpunit/languages/LanguageUzTest.php b/tests/phpunit/languages/classes/LanguageUzTest.php
index 4881103f..4881103f 100644
--- a/tests/phpunit/languages/LanguageUzTest.php
+++ b/tests/phpunit/languages/classes/LanguageUzTest.php
diff --git a/tests/phpunit/languages/LanguageWaTest.php b/tests/phpunit/languages/classes/LanguageWaTest.php
index d05196c0..d05196c0 100644
--- a/tests/phpunit/languages/LanguageWaTest.php
+++ b/tests/phpunit/languages/classes/LanguageWaTest.php