test: coverage recording now needs to be explicit
[mediawiki.git] / tests / phpunit / languages / LanguageRuTest.php
blobbfd507486cd44b1ce4354a2df74df0b5b8a3b835
1 <?php
2 /**
3 * @author Amir E. Aharoni
4 * based on LanguageBe_tarask.php
5 * @copyright Copyright © 2012, Amir E. Aharoni
6 * @file
7 */
9 /** Tests for MediaWiki languages/classes/LanguageRu.php */
10 class LanguageRuTest extends LanguageClassesTestCase {
11 /** @dataProvider providePlural */
12 function testPlural( $result, $value ) {
13 $forms = array( 'one', 'few', 'many', 'other' );
14 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
17 /** @dataProvider providePlural */
18 function testGetPluralRuleType( $result, $value ) {
19 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
22 public static function providePlural() {
23 return array(
24 array( 'one', 1 ),
25 array( 'many', 11 ),
26 array( 'one', 91 ),
27 array( 'one', 121 ),
28 array( 'few', 2 ),
29 array( 'few', 3 ),
30 array( 'few', 4 ),
31 array( 'few', 334 ),
32 array( 'many', 5 ),
33 array( 'many', 15 ),
34 array( 'many', 120 ),
38 /** @dataProvider providePluralTwoForms */
39 function testPluralTwoForms( $result, $value ) {
40 $forms = array( 'one', 'other' );
41 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
44 public static function providePluralTwoForms() {
45 return array(
46 array( 'one', 1 ),
47 array( 'other', 11 ),
48 array( 'other', 91 ),
49 array( 'other', 121 ),
53 /** @dataProvider providerGrammar */
54 function testGrammar( $result, $word, $case ) {
55 $this->assertEquals( $result, $this->getLang()->convertGrammar( $word, $case ) );
58 public static function providerGrammar() {
59 return array(
60 array(
61 'Википедии',
62 'Википедия',
63 'genitive',
65 array(
66 'Викитеки',
67 'Викитека',
68 'genitive',
70 array(
71 'Викитеке',
72 'Викитека',
73 'prepositional',
75 array(
76 'Викиданных',
77 'Викиданные',
78 'prepositional',