Move ResultWrapper subclasses to Rdbms
[mediawiki.git] / tests / phpunit / languages / classes / LanguageLvTest.php
blob9827c68b014b54f356338d1fdd92df289ab88039
1 <?php
2 /**
3 * @author Santhosh Thottingal
4 * @copyright Copyright © 2012, Santhosh Thottingal
5 * @file
6 */
8 /** Tests for Latvian */
9 class LanguageLvTest extends LanguageClassesTestCase {
10 /**
11 * @dataProvider providePlural
12 * @covers Language::convertPlural
14 public function testPlural( $result, $value ) {
15 $forms = [ 'zero', 'one', '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 [ 'zero', 0 ],
30 [ 'one', 1 ],
31 [ 'zero', 11 ],
32 [ 'one', 21 ],
33 [ 'zero', 411 ],
34 [ 'other', 2 ],
35 [ 'other', 9 ],
36 [ 'zero', 12 ],
37 [ 'other', 12.345 ],
38 [ 'zero', 20 ],
39 [ 'other', 22 ],
40 [ 'one', 31 ],
41 [ 'zero', 200 ],