Allow the retrieval of the plural rule type for a given number
[lhc/web/wiklou.git] / tests / phpunit / languages / LanguageCuTest.php
index 5d5d60c..7384918 100644 (file)
@@ -6,36 +6,31 @@
  */
 
 /** Tests for MediaWiki languages/LanguageCu.php */
-class LanguageCuTest extends MediaWikiTestCase {
-       private $lang;
-
-       protected function setUp() {
-               $this->lang = Language::factory( 'cu' );
-       }
-       protected function tearDown() {
-               unset( $this->lang );
+class LanguageCuTest extends LanguageClassesTestCase {
+       /** @dataProvider providePlural */
+       function testPlural( $result, $value ) {
+               $forms =  array( 'one', 'two', 'few', 'other' );
+               $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
-       /** @dataProvider providerPlural */
-       function testPlural( $result, $value ) {
-               $forms =  array( 'one', 'few', 'many', 'other' );
-               $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) );
+       /** @dataProvider providePlural */
+       function testGetPluralRuleType( $result, $value ) {
+               $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
        }
 
-       function providerPlural() {
+       function providePlural() {
                return array (
                        array( 'other', 0 ),
                        array( 'one', 1 ),
-                       array( 'few', 2 ),
-                       array( 'many', 3 ),
-                       array( 'many', 4 ),
+                       array( 'two', 2 ),
+                       array( 'few', 3 ),
+                       array( 'few', 4 ),
                        array( 'other', 5 ),
                        array( 'one', 11 ),
                        array( 'other', 20 ),
-                       array( 'few', 22 ),
-                       array( 'many', 223 ),
+                       array( 'two', 22 ),
+                       array( 'few', 223 ),
                        array( 'other', 200 ),
                );
        }
-
 }