Merge "Add data provider to split MediaHandlerTest::testFitBoxWidth"
[lhc/web/wiklou.git] / tests / phpunit / languages / 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 = array( '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 array(
30 array( 'few', 0 ),
31 array( 'one', 1 ),
32 array( 'two', 2 ),
33 array( 'other', 3 ),
34 array( 'few', 20 ),
35 array( 'one', 21 ),
36 array( 'two', 22 ),
37 array( 'other', 23 ),
38 array( 'other', 50 ),
39 array( 'few', 60 ),
40 array( 'few', 80 ),
41 array( 'few', 100 )
42 );
43 }
44 }