Merge "Add data provider to split MediaHandlerTest::testFitBoxWidth"
[lhc/web/wiklou.git] / tests / phpunit / languages / LanguageShTest.php
index 282fd2f..1b39087 100644 (file)
@@ -5,20 +5,38 @@
  * @file
  */
 
-/** Tests for MediaWiki languages/classes/LanguageSh.php */
+/** Tests for  srpskohrvatski / српскохрватски / Serbocroatian */
 class LanguageShTest extends LanguageClassesTestCase {
-
-       /** @dataProvider providerPlural */
-       function testPlural( $result, $value ) {
-               $forms = array( 'one', 'many' );
+       /**
+        * @dataProvider providePlural
+        * @covers Language::convertPlural
+        */
+       public function testPlural( $result, $value ) {
+               $forms = array( 'one', 'few', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
-       function providerPlural() {
+       /**
+        * @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( 'other', 0 ),
                        array( 'one', 1 ),
-                       array( 'many', 2 ),
+                       array( 'few', 2 ),
+                       array( 'few', 4 ),
+                       array( 'other', 5 ),
+                       array( 'other', 10 ),
+                       array( 'other', 11 ),
+                       array( 'other', 12 ),
+                       array( 'one', 101 ),
+                       array( 'few', 102 ),
+                       array( 'other', 111 ),
                );
        }
 }