Merge "allow combined width/height param in {{filepath:}}"
[lhc/web/wiklou.git] / tests / phpunit / languages / LanguageLtTest.php
1 <?php
2 /**
3 * @author Santhosh Thottingal
4 * @copyright Copyright © 2012, Santhosh Thottingal
5 * @file
6 */
7
8 /** Tests for MediaWiki languages/LanguageLt.php */
9 class LanguageLtTest extends MediaWikiTestCase {
10 private $lang;
11
12 function setUp() {
13 $this->lang = Language::factory( 'Lt' );
14 }
15 function tearDown() {
16 unset( $this->lang );
17 }
18
19 /** @dataProvider provideOneFewOtherCases */
20 function testOneFewOtherPlural( $result, $value ) {
21 $forms = array( 'one', 'few', 'other' );
22 $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) );
23 }
24
25 /** @dataProvider provideOneFewCases */
26 function testOneFewPlural( $result, $value ) {
27 $forms = array( 'one', 'few' );
28 $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) );
29 }
30
31 function provideOneFewOtherCases() {
32 return array (
33 array( 'other', 0 ),
34 array( 'one', 1 ),
35 array( 'few', 2 ),
36 array( 'few', 9 ),
37 array( 'other', 10 ),
38 array( 'other', 11 ),
39 array( 'other', 20 ),
40 array( 'one', 21 ),
41 array( 'few', 32 ),
42 array( 'one', 41 ),
43 array( 'one', 40001 ),
44 );
45 }
46
47 function provideOneFewCases() {
48 return array (
49 array( 'one', 1 ),
50 array( 'few', 15 ),
51 );
52 }
53 }