8f5d7649bdf3eed61500efcdd5f55ee6be7b34ed
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
{
10 /** @dataProvider providePlural */
11 function testPlural( $result, $value ) {
12 $forms = array( 'one', 'few', 'many', 'other' );
13 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
16 /** @dataProvider providePlural */
17 function testGetPluralRuleType( $result, $value ) {
18 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
21 function providePlural() {
31 array( 'other', 100 ),
32 array( 'other', 101 ),
37 array( 'other', 120 ),
38 array( 'other', 201 ),
42 /** @dataProvider providerPluralTwoForms */
43 function testPluralTwoForms( $result, $value ) {
44 $forms = array( 'one', 'other' );
45 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
48 function providerPluralTwoForms() {
58 array( 'other', 100 ),
59 array( 'other', 101 ),
60 array( 'other', 102 ),
61 array( 'other', 110 ),
62 array( 'other', 111 ),
63 array( 'other', 119 ),
64 array( 'other', 120 ),
65 array( 'other', 201 ),