Added release notes for 'ContentHandler::runLegacyHooks' removal
[mediawiki.git] / tests / phpunit / languages / classes / LanguageSeTest.php
blobb0da39835294561a2af77ae7b084772ac4d47994
1 <?php
2 /**
3 * @author Amir E. Aharoni
4 * @copyright Copyright © 2012, Amir E. Aharoni
5 * @file
6 */
8 /** Tests for MediaWiki languages/classes/LanguageSe.php */
9 class LanguageSeTest extends LanguageClassesTestCase {
10 /**
11 * @dataProvider providePlural
12 * @covers Language::convertPlural
14 public function testPlural( $result, $value ) {
15 $forms = [ 'one', 'two', 'other' ];
16 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
19 /**
20 * @dataProvider providePlural
21 * @covers Language::getPluralRuleType
23 public function testGetPluralRuleType( $result, $value ) {
24 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
27 public static function providePlural() {
28 return [
29 [ 'other', 0 ],
30 [ 'one', 1 ],
31 [ 'two', 2 ],
32 [ 'other', 3 ],
36 /**
37 * @dataProvider providePluralTwoForms
38 * @covers Language::convertPlural
40 public function testPluralTwoForms( $result, $value ) {
41 $forms = [ 'one', 'other' ];
42 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
45 public static function providePluralTwoForms() {
46 return [
47 [ 'other', 0 ],
48 [ 'one', 1 ],
49 [ 'other', 2 ],
50 [ 'other', 3 ],