Move ResultWrapper subclasses to Rdbms
[mediawiki.git] / tests / phpunit / languages / classes / LanguageBeTest.php
blobde1adb7d419c0cd1d0cfcdcbe095ac8a564a684f
1 <?php
2 /**
3 * @author Santhosh Thottingal
4 * @copyright Copyright © 2012, Santhosh Thottingal
5 * @file
6 */
8 /** Tests for MediaWiki languages/LanguageBe.php */
9 class LanguageBeTest extends LanguageClassesTestCase {
10 /**
11 * @dataProvider providePlural
12 * @covers Language::convertPlural
14 public function testPlural( $result, $value ) {
15 $forms = [ 'one', 'few', 'many', '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 [ 'one', 1 ],
30 [ 'many', 11 ],
31 [ 'one', 91 ],
32 [ 'one', 121 ],
33 [ 'few', 2 ],
34 [ 'few', 3 ],
35 [ 'few', 4 ],
36 [ 'few', 334 ],
37 [ 'many', 5 ],
38 [ 'many', 15 ],
39 [ 'many', 120 ],