Merge "jpegmeta: Add links to source version and improve documentation"
[lhc/web/wiklou.git] / tests / phpunit / languages / LanguagePlTest.php
index 1e36097..d180037 100644 (file)
@@ -7,14 +7,24 @@
 
 /** Tests for MediaWiki languages/classes/LanguagePl.php */
 class LanguagePlTest extends LanguageClassesTestCase {
-
-       /** @dataProvider providerPluralFourForms */
-       function testPluralFourForms( $result, $value ) {
+       /**
+        * @dataProvider providePlural
+        * @covers Language::convertPlural
+        */
+       public function testPlural( $result, $value ) {
                $forms = array( 'one', 'few', 'many' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
-       function providerPluralFourForms() {
+       /**
+        * @dataProvider providePlural
+        * @covers Language::getPluralRuleType
+        */
+       public function testGetPluralRuleType( $result, $value ) {
+               $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
+       }
+
+       public static function providePlural() {
                return array(
                        array( 'many', 0 ),
                        array( 'one', 1 ),
@@ -35,30 +45,33 @@ class LanguagePlTest extends LanguageClassesTestCase {
                );
        }
 
-       /** @dataProvider providerPlural */
-       function testPlural( $result, $value ) {
-               $forms = array( 'one', 'many' );
+       /**
+        * @dataProvider providePluralTwoForms
+        * @covers Language::convertPlural
+        */
+       public function testPluralTwoForms( $result, $value ) {
+               $forms = array( 'one', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
-       function providerPlural() {
+       public static function providePluralTwoForms() {
                return array(
-                       array( 'many', 0 ),
+                       array( 'other', 0 ),
                        array( 'one', 1 ),
-                       array( 'many', 2 ),
-                       array( 'many', 3 ),
-                       array( 'many', 4 ),
-                       array( 'many', 5 ),
-                       array( 'many', 9 ),
-                       array( 'many', 10 ),
-                       array( 'many', 11 ),
-                       array( 'many', 21 ),
-                       array( 'many', 22 ),
-                       array( 'many', 23 ),
-                       array( 'many', 24 ),
-                       array( 'many', 25 ),
-                       array( 'many', 200 ),
-                       array( 'many', 201 ),
+                       array( 'other', 2 ),
+                       array( 'other', 3 ),
+                       array( 'other', 4 ),
+                       array( 'other', 5 ),
+                       array( 'other', 9 ),
+                       array( 'other', 10 ),
+                       array( 'other', 11 ),
+                       array( 'other', 21 ),
+                       array( 'other', 22 ),
+                       array( 'other', 23 ),
+                       array( 'other', 24 ),
+                       array( 'other', 25 ),
+                       array( 'other', 200 ),
+                       array( 'other', 201 ),
                );
        }
 }