Merge "(Bug 44192) Do not attempt to send a real e-mail in ApiAccountCreationTest"
[lhc/web/wiklou.git] / tests / phpunit / languages / LanguageMoTest.php
1 <?php
2 /**
3 * @author Santhosh Thottingal
4 * @copyright Copyright © 2012, Santhosh Thottingal
5 * @file
6 */
7
8 /** Tests for MediaWiki languages/classes/LanguageMo.php */
9 class LanguageMoTest extends LanguageClassesTestCase {
10
11 /** @dataProvider providerPlural */
12 function testPlural( $result, $value ) {
13 $forms = array( 'one', 'few', 'other' );
14 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
15 }
16
17 function providerPlural() {
18 return array(
19 array( 'few', 0 ),
20 array( 'one', 1 ),
21 array( 'few', 2 ),
22 array( 'few', 19 ),
23 array( 'other', 20 ),
24 array( 'other', 99 ),
25 array( 'other', 100 ),
26 array( 'few', 101 ),
27 array( 'few', 119 ),
28 array( 'other', 120 ),
29 array( 'other', 200 ),
30 array( 'few', 201 ),
31 array( 'few', 219 ),
32 array( 'other', 220 ),
33 );
34 }
35 }