Debian Codegraph @

tests/phpunit/includes/languages/LanguageGaTest.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 Irish (Gaeilge)
10 *
11 * @group Language
12 * @covers \LanguageGa
13 */
14 class LanguageGaTest extends LanguageClassesTestCase {
15 /**
16 * @dataProvider providePlural
17 * @covers \MediaWiki\Language\Language::convertPlural
18 */
19 public function testPlural( $result, $value ) {
20 $forms = [ 'one', 'two', 'other' ];
21 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
22 }
23
24 /**
25 * @dataProvider providePlural
26 * @covers \MediaWiki\Language\Language::getPluralRuleType
27 */
28 public function testGetPluralRuleType( $result, $value ) {
29 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
30 }
31
32 public static function providePlural() {
33 return [
34 [ 'other', 0 ],
35 [ 'one', 1 ],
36 [ 'two', 2 ],
37 [ 'other', 200 ],
38 ];
39 }
40 }