3 * @author Amir E. Aharoni
4 * @copyright Copyright © 2012, Amir E. Aharoni
8 /** Tests for MediaWiki languages/classes/LanguageMt.php */
9 class LanguageMtTest
extends LanguageClassesTestCase
{
11 * @dataProvider providePlural
12 * @covers Language::convertPlural
14 public function testPlural( $result, $value ) {
15 $forms = array( 'one', 'few', 'many', 'other' );
16 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
20 * @dataProvider providePlural
21 * @covers Language::getPluralRuleType
23 public function testGetPluralRuleType( $result, $value ) {
24 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
27 public static function providePlural() {
37 array( 'other', 100 ),
38 array( 'other', 101 ),
43 array( 'other', 120 ),
44 array( 'other', 201 ),
49 * @dataProvider providePluralTwoForms
50 * @covers Language::convertPlural
52 public function testPluralTwoForms( $result, $value ) {
53 $forms = array( 'one', 'other' );
54 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
57 public static function providePluralTwoForms() {
67 array( 'other', 100 ),
68 array( 'other', 101 ),
69 array( 'other', 102 ),
70 array( 'other', 110 ),
71 array( 'other', 111 ),
72 array( 'other', 119 ),
73 array( 'other', 120 ),
74 array( 'other', 201 ),