Merge "Add wfProfileOut to the new returns added by 19ecb69f"
[lhc/web/wiklou.git] / tests / phpunit / languages / LanguageSeTest.php
1 <?php
2 /**
3 * @author Amir E. Aharoni
4 * @copyright Copyright © 2012, Amir E. Aharoni
5 * @file
6 */
7
8 /** Tests for MediaWiki languages/classes/LanguageSe.php */
9 class LanguageSeTest extends LanguageClassesTestCase {
10 /** @dataProvider providePlural */
11 function testPlural( $result, $value ) {
12 $forms = array( 'one', 'two', 'other' );
13 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
14 }
15
16 /** @dataProvider providePlural */
17 function testGetPluralRuleType( $result, $value ) {
18 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
19 }
20
21 public static function providePlural() {
22 return array(
23 array( 'other', 0 ),
24 array( 'one', 1 ),
25 array( 'two', 2 ),
26 array( 'other', 3 ),
27 );
28 }
29
30 /** @dataProvider providerPluralTwoForms */
31 function testPluralTwoForms( $result, $value ) {
32 $forms = array( 'one', 'other' );
33 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
34 }
35
36 public static function providerPluralTwoForms() {
37 return array(
38 array( 'other', 0 ),
39 array( 'one', 1 ),
40 array( 'other', 2 ),
41 array( 'other', 3 ),
42 );
43 }
44 }