Merge "Selenium: replace UserLoginPage with BlankPage where possible"
[lhc/web/wiklou.git] / tests / phpunit / languages / classes / LanguageGvTest.php
1 <?php
2 /**
3 * Test for Manx (Gaelg) language
4 *
5 * @author Santhosh Thottingal
6 * @copyright Copyright © 2013, Santhosh Thottingal
7 * @file
8 */
9
10 class LanguageGvTest extends LanguageClassesTestCase {
11 /**
12 * @dataProvider providePlural
13 * @covers Language::convertPlural
14 */
15 public function testPlural( $result, $value ) {
16 $forms = [ 'one', 'two', 'few', 'other' ];
17 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
18 }
19
20 /**
21 * @dataProvider providePlural
22 * @covers Language::getPluralRuleType
23 */
24 public function testGetPluralRuleType( $result, $value ) {
25 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
26 }
27
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 ]
42 ];
43 }
44 }