Debian Codegraph @

tests/phpunit/includes/languages/LanguageMkTest.php

raw symbols SCIP
1 <?php
2 /**
3 * @author Santhosh Thottingal
4 * @copyright Copyright © 2012, Santhosh Thottingal
5 * @file
6 */
7
8 /**
9 * Tests for Macedonian (македонски)
10 *
11 * @group Language
12 */
13 class LanguageMkTest extends LanguageClassesTestCase {
14 /**
15 * @dataProvider providePlural
16 * @covers \MediaWiki\Language\Language::convertPlural
17 */
18 public function testPlural( $result, $value ) {
19 $forms = [ 'one', 'other' ];
20 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
21 }
22
23 /**
24 * @dataProvider providePlural
25 * @covers \MediaWiki\Language\Language::getPluralRuleType
26 */
27 public function testGetPluralRuleType( $result, $value ) {
28 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
29 }
30
31 public static function providePlural() {
32 return [
33 [ 'other', 0 ],
34 [ 'one', 1 ],
35 [ 'one', 11 ],
36 [ 'one', 21 ],
37 [ 'one', 411 ],
38 [ 'other', 12.345 ],
39 [ 'other', 20 ],
40 [ 'one', 31 ],
41 [ 'other', 200 ],
42 ];
43 }
44 }