X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fphpunit%2Flanguages%2FLanguageMgTest.php;h=f4eb99ad04c104643c9e90505252f326b156eba2;hb=b36d883017982f9642fea4513cc7273561fba38c;hp=d6ac643efb02e7695d94f92b4c44e73cb98e2c98;hpb=5abe15bb9daa6197544087688d73ba11eb7fa801;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/languages/LanguageMgTest.php b/tests/phpunit/languages/LanguageMgTest.php index d6ac643efb..f4eb99ad04 100644 --- a/tests/phpunit/languages/LanguageMgTest.php +++ b/tests/phpunit/languages/LanguageMgTest.php @@ -6,24 +6,20 @@ */ /** Tests for MediaWiki languages/classes/LanguageMg.php */ -class LanguageMgTest extends MediaWikiTestCase { - private $lang; - - protected function setUp() { - $this->lang = Language::factory( 'mg' ); - } - protected function tearDown() { - unset( $this->lang ); +class LanguageMgTest extends LanguageClassesTestCase { + /** @dataProvider providePlural */ + function testPlural( $result, $value ) { + $forms = array( 'one', 'other' ); + $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) ); } /** @dataProvider providePlural */ - function testPlural( $result, $value ) { - $forms = array( 'one', 'other' ); - $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) ); + function testGetPluralRuleType( $result, $value ) { + $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) ); } - function providePlural() { - return array ( + public static function providePlural() { + return array( array( 'one', 0 ), array( 'one', 1 ), array( 'other', 2 ), @@ -31,5 +27,4 @@ class LanguageMgTest extends MediaWikiTestCase { array( 'other', 123.3434 ), ); } - }