efb6de6e86fdffd0900fe7f9612c448a32788fae
[lhc/web/wiklou.git] / tests / phpunit / languages / LanguageLvTest.php
1 <?php
2 /**
3 * @author Santhosh Thottingal
4 * @copyright Copyright © 2012, Santhosh Thottingal
5 * @file
6 */
7
8 /** Tests for MediaWiki languages/classes/LanguageLv.php */
9 class LanguageLvTest extends LanguageClassesTestCase {
10
11 /** @dataProvider providerPlural */
12 function testPlural( $result, $value ) {
13 $forms = array( 'one', 'other' );
14 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
15 }
16
17 function providerPlural() {
18 return array(
19 array( 'other', 0 ), #this must be zero form as per CLDR
20 array( 'one', 1 ),
21 array( 'other', 11 ),
22 array( 'one', 21 ),
23 array( 'other', 411 ),
24 array( 'other', 12.345 ),
25 array( 'other', 20 ),
26 array( 'one', 31 ),
27 array( 'other', 200 ),
28 );
29 }
30
31 }