test: coverage recording now needs to be explicit
[mediawiki.git] / tests / phpunit / languages / LanguageGdTest.php
blobedf8e50693e0217e60b65880b11655f69223a6b8
1 <?php
2 /**
3 * @author Santhosh Thottingal
4 * @copyright Copyright © 2012-2013, Santhosh Thottingal
5 * @file
6 */
8 /** Tests for MediaWiki languages/classes/LanguageGd.php */
9 class LanguageGdTest extends LanguageClassesTestCase {
10 /** @dataProvider providerPlural */
11 function testPlural( $result, $value ) {
12 $forms = array( 'one', 'two', 'few', 'other' );
13 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
16 public static function providerPlural() {
17 return array(
18 array( 'other', 0 ),
19 array( 'one', 1 ),
20 array( 'two', 2 ),
21 array( 'one', 11 ),
22 array( 'two', 12 ),
23 array( 'few', 3 ),
24 array( 'few', 19 ),
25 array( 'other', 200 ),
29 /** @dataProvider providerPluralExplicit */
30 function testExplicitPlural( $result, $value ) {
31 $forms = array( 'one', 'two', 'few', 'other', '11=Form11', '12=Form12' );
32 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
35 public static function providerPluralExplicit() {
36 return array(
37 array( 'other', 0 ),
38 array( 'one', 1 ),
39 array( 'two', 2 ),
40 array( 'Form11', 11 ),
41 array( 'Form12', 12 ),
42 array( 'few', 3 ),
43 array( 'few', 19 ),
44 array( 'other', 200 ),