Merge "Change name of section so it does not get confused with Wikidata"
[lhc/web/wiklou.git] / tests / phpunit / languages / LanguageGvTest.php
1 <?php
2 /**
3 * @author Santhosh Thottingal
4 * @copyright Copyright © 2012, Santhosh Thottingal
5 * @file
6 */
7
8 /** Tests for MediaWiki languages/classes/LanguageGv.php */
9 class LanguageGvTest extends LanguageClassesTestCase {
10
11 /** @dataProvider providerPlural */
12 function testPlural( $result, $value ) {
13 // This is not compatible with CLDR plural rules http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#gv
14 $forms = array( 'Form 1', 'Form 2', 'Form 3', 'Form 4' );
15 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
16 }
17 function providerPlural() {
18 return array (
19 array( 'Form 4', 0 ),
20 array( 'Form 2', 1 ),
21 array( 'Form 3', 2 ),
22 array( 'Form 4', 3 ),
23 array( 'Form 1', 20 ),
24 array( 'Form 2', 21 ),
25 array( 'Form 3', 22 ),
26 array( 'Form 4', 23 ),
27 array( 'Form 4', 50 ),
28 );
29 }
30
31 }