test: coverage recording now needs to be explicit
[mediawiki.git] / tests / phpunit / languages / LanguageUkTest.php
blob3180d30fae84c91cbca8fd6cbf6e228624ea7e0d
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/LanguageUk.php */
10 class LanguageUkTest 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 ),