Merge "Update docs/hooks.txt for ShowSearchHitTitle"
[mediawiki.git] / tests / phpunit / languages / classes / LanguageGvTest.php
blob20e47867ca62c6f1b8b1f5cb4a1bf89fe3bfee8f
1 <?php
2 /**
3 * Test for Manx (Gaelg) language
5 * @author Santhosh Thottingal
6 * @copyright Copyright © 2013, Santhosh Thottingal
7 * @file
8 */
10 class LanguageGvTest extends LanguageClassesTestCase {
11 /**
12 * @dataProvider providePlural
13 * @covers Language::convertPlural
15 public function testPlural( $result, $value ) {
16 $forms = [ 'one', 'two', 'few', 'other' ];
17 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
20 /**
21 * @dataProvider providePlural
22 * @covers Language::getPluralRuleType
24 public function testGetPluralRuleType( $result, $value ) {
25 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
28 public static function providePlural() {
29 return [
30 [ 'few', 0 ],
31 [ 'one', 1 ],
32 [ 'two', 2 ],
33 [ 'other', 3 ],
34 [ 'few', 20 ],
35 [ 'one', 21 ],
36 [ 'two', 22 ],
37 [ 'other', 23 ],
38 [ 'other', 50 ],
39 [ 'few', 60 ],
40 [ 'few', 80 ],
41 [ 'few', 100 ]