Merge "Use selectRow when load one ArchivedFile"
[lhc/web/wiklou.git] / tests / phpunit / languages / LanguageGdTest.php
1 <?php
2 /**
3 * @author Santhosh Thottingal
4 * @copyright Copyright © 2012, Santhosh Thottingal
5 * @file
6 */
7
8 /** Tests for MediaWiki languages/classes/LanguageGd.php */
9 class LanguageGdTest extends LanguageClassesTestCase {
10
11 /** @dataProvider providerPlural */
12 function testPlural( $result, $value ) {
13 // The CLDR ticket for this plural forms is not same as mw plural forms. See http://unicode.org/cldr/trac/ticket/2883
14 $forms = array( 'Form 1', 'Form 2', 'Form 3', 'Form 4', 'Form 5', 'Form 6' );
15 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
16 }
17 function providerPlural() {
18 return array (
19 array( 'Form 6', 0 ),
20 array( 'Form 1', 1 ),
21 array( 'Form 2', 2 ),
22 array( 'Form 3', 11 ),
23 array( 'Form 4', 12 ),
24 array( 'Form 5', 3 ),
25 array( 'Form 5', 19 ),
26 array( 'Form 6', 200 ),
27 );
28 }
29
30 }