Stop doing $that = $this in Tests
[mediawiki.git] / tests / phpunit / languages / classes / LanguageLvTest.php
blob7120cfe38479c1b72faeaff516f030d21b55b74c
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 = array( '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 array(
29 array( 'zero', 0 ),
30 array( 'one', 1 ),
31 array( 'zero', 11 ),
32 array( 'one', 21 ),
33 array( 'zero', 411 ),
34 array( 'other', 2 ),
35 array( 'other', 9 ),
36 array( 'zero', 12 ),
37 array( 'other', 12.345 ),
38 array( 'zero', 20 ),
39 array( 'other', 22 ),
40 array( 'one', 31 ),
41 array( 'zero', 200 ),