Fixed dependencies for jquery.collapsibleTabs
[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 MediaWikiTestCase {
10 private $lang;
11
12 function setUp() {
13 $this->lang = Language::factory( 'lv' );
14 }
15 function tearDown() {
16 unset( $this->lang );
17 }
18
19 /** @dataProvider providerPlural */
20 function testPlural( $result, $value ) {
21 $forms = array( 'one', 'other' );
22 $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) );
23 }
24
25 function providerPlural() {
26 return array (
27 array( 'other', 0 ), #this must be zero form as per CLDR
28 array( 'one', 1 ),
29 array( 'other', 11 ),
30 array( 'one', 21 ),
31 array( 'other', 411 ),
32 array( 'other', 12.345 ),
33 array( 'other', 20 ),
34 array( 'one', 31 ),
35 array( 'other', 200 ),
36 );
37 }
38
39 }