Added release notes for 'ContentHandler::runLegacyHooks' removal
[mediawiki.git] / tests / phpunit / languages / classes / LanguageSgsTest.php
blob7721433d266521bbbd05c0cbfa53c305d081e9a5
1 <?php
2 /**
3 * @author Amir E. Aharoni
4 * @copyright Copyright © 2012, Amir E. Aharoni
5 * @file
6 */
8 /** Tests for Samogitian */
9 class LanguageSgsTest extends LanguageClassesTestCase {
10 /**
11 * @dataProvider providePluralAllForms
12 * @covers Language::convertPlural
14 public function testPluralAllForms( $result, $value ) {
15 $forms = [ 'one', 'two', 'few', 'other' ];
16 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
19 /**
20 * @dataProvider providePluralAllForms
21 * @covers Language::getPluralRuleType
23 public function testGetPluralRuleType( $result, $value ) {
24 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
27 public static function providePluralAllForms() {
28 return [
29 [ 'few', 0 ],
30 [ 'one', 1 ],
31 [ 'two', 2 ],
32 [ 'other', 3 ],
33 [ 'few', 10 ],
34 [ 'few', 11 ],
35 [ 'few', 12 ],
36 [ 'few', 19 ],
37 [ 'other', 20 ],
38 [ 'few', 100 ],
39 [ 'one', 101 ],
40 [ 'few', 111 ],
41 [ 'few', 112 ],
45 /**
46 * @dataProvider providePluralTwoForms
47 * @covers Language::convertPlural
49 public function testPluralTwoForms( $result, $value ) {
50 $forms = [ 'one', 'other' ];
51 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
54 public static function providePluralTwoForms() {
55 return [
56 [ 'other', 0 ],
57 [ 'one', 1 ],
58 [ 'other', 2 ],
59 [ 'other', 3 ],
60 [ 'other', 10 ],
61 [ 'other', 11 ],
62 [ 'other', 12 ],
63 [ 'other', 19 ],
64 [ 'other', 20 ],
65 [ 'other', 100 ],
66 [ 'one', 101 ],
67 [ 'other', 111 ],
68 [ 'other', 112 ],