Merge "Don't allow completing a partial stash upload"
[lhc/web/wiklou.git] / tests / phpunit / languages / classes / 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 = [ '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 [
30 [ 'other', 0 ],
31 [ 'one', 1 ],
32 [ 'few', 2 ],
33 [ 'few', 3 ],
34 [ 'few', 4 ],
35 [ 'other', 5 ],
36 [ 'other', 11 ],
37 [ 'other', 20 ],
38 [ 'other', 25 ],
39 [ 'other', 200 ],
40 ];
41 }
42 }