X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/mediawiki.git/blobdiff_plain/19e297c21b10b1b8a3acad5e73fc71dcb35db44a..6932310fd58ebef145fa01eb76edf7150284d8ea:/tests/phpunit/languages/classes/LanguageCuTest.php diff --git a/tests/phpunit/languages/classes/LanguageCuTest.php b/tests/phpunit/languages/classes/LanguageCuTest.php new file mode 100644 index 00000000..de65d162 --- /dev/null +++ b/tests/phpunit/languages/classes/LanguageCuTest.php @@ -0,0 +1,42 @@ +assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) ); + } + + /** + * @dataProvider providePlural + * @covers Language::getPluralRuleType + */ + public function testGetPluralRuleType( $result, $value ) { + $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) ); + } + + public static function providePlural() { + return [ + [ 'other', 0 ], + [ 'one', 1 ], + [ 'two', 2 ], + [ 'few', 3 ], + [ 'few', 4 ], + [ 'other', 5 ], + [ 'one', 11 ], + [ 'other', 20 ], + [ 'two', 22 ], + [ 'few', 223 ], + [ 'other', 200 ], + ]; + } +}