Merge "Add data provider to split MediaHandlerTest::testFitBoxWidth"
[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 LanguageClassesTestCase {
11 /**
12 * @dataProvider providePlural
13 * @covers Language::convertPlural
14 */
15 public function testPlural( $result, $value ) {
16 $forms = array( 'one', 'few', 'other' );
17 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
18 }
19
20 /**
21 * @dataProvider providePlural
22 * @covers Language::getPluralRuleType
23 */
24 public function testGetPluralRuleType( $result, $value ) {
25 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
26 }
27
28 public static function providePlural() {
29 return array(
30 array( 'other', 0 ),
31 array( 'one', 1 ),
32 array( 'few', 2 ),
33 array( 'few', 3 ),
34 array( 'few', 4 ),
35 array( 'other', 5 ),
36 array( 'other', 11 ),
37 array( 'other', 20 ),
38 array( 'other', 25 ),
39 array( 'other', 200 ),
40 );
41 }
42 }