Merge "don't overwrite $item['single-id'] in makeListItem in SkinTemplate"
[lhc/web/wiklou.git] / tests / phpunit / languages / LanguageSkTest.php
1 <?php
2 /**
3 * @author Santhosh Thottingal
4 * @copyright Copyright © 2012, Amir E. Aharoni
5 * based on LanguageSkTest.php
6 * @file
7 */
8
9 /** Tests for MediaWiki languages/classes/LanguageSk.php */
10 class LanguageSkTest extends MediaWikiTestCase {
11 private $lang;
12
13 protected function setUp() {
14 $this->lang = Language::factory( 'sk' );
15 }
16 protected function tearDown() {
17 unset( $this->lang );
18 }
19
20 /** @dataProvider providerPlural */
21 function testPlural( $result, $value ) {
22 $forms = array( 'one', 'few', 'other' );
23 $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) );
24 }
25
26 function providerPlural() {
27 return array (
28 array( 'other', 0 ),
29 array( 'one', 1 ),
30 array( 'few', 2 ),
31 array( 'few', 3 ),
32 array( 'few', 4 ),
33 array( 'other', 5 ),
34 array( 'other', 11 ),
35 array( 'other', 20 ),
36 array( 'other', 25 ),
37 array( 'other', 200 ),
38 );
39 }
40 }