Allow the retrieval of the plural rule type for a given number
[lhc/web/wiklou.git] / tests / phpunit / languages / LanguageArTest.php
index 523ee7f..fee05fc 100644 (file)
@@ -6,7 +6,6 @@
 
 /** Tests for MediaWiki languages/LanguageAr.php */
 class LanguageArTest extends LanguageClassesTestCase {
-
        function testFormatNum() {
                $this->assertEquals( '١٬٢٣٤٬٥٦٧', $this->getLang()->formatNum( '1234567' ) );
                $this->assertEquals( '-١٢٫٨٩', $this->getLang()->formatNum( -12.89 ) );
@@ -51,6 +50,11 @@ class LanguageArTest extends LanguageClassesTestCase {
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
+       /** @dataProvider providePlural */
+       function testGetPluralRuleType( $result, $value ) {
+               $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
+       }
+
        function providePlural() {
                return array(
                        array( 'zero', 0 ),