Choose parentids in tests as they are in real dumps
[lhc/web/wiklou.git] / tests / phpunit / languages / LanguageSlTest.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/LanguageSl.php */
10 class LanguageSlTest extends MediaWikiTestCase {
11 private $lang;
12
13 function setUp() {
14 $this->lang = Language::factory( 'sl' );
15 }
16 function tearDown() {
17 unset( $this->lang );
18 }
19
20 /** @dataProvider providerPlural */
21 function testPlural( $result, $value ) {
22 $forms = array( 'one', 'two', 'few', 'other', 'zero' );
23 $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) );
24 }
25
26 function providerPlural() {
27 return array (
28 array( 'zero', 0 ),
29 array( 'one', 1 ),
30 array( 'two', 2 ),
31 array( 'few', 3 ),
32 array( 'few', 4 ),
33 array( 'other', 5 ),
34 array( 'other', 99 ),
35 array( 'other', 100 ),
36 array( 'one', 101 ),
37 array( 'two', 102 ),
38 array( 'few', 103 ),
39 array( 'one', 201 ),
40 );
41 }
42 }