summaryrefslogtreecommitdiff
path: root/tests/phpunit/languages/LanguageMlTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/languages/LanguageMlTest.php')
-rw-r--r--tests/phpunit/languages/LanguageMlTest.php29
1 files changed, 12 insertions, 17 deletions
diff --git a/tests/phpunit/languages/LanguageMlTest.php b/tests/phpunit/languages/LanguageMlTest.php
index 8c4b0b2f..4fa45ce3 100644
--- a/tests/phpunit/languages/LanguageMlTest.php
+++ b/tests/phpunit/languages/LanguageMlTest.php
@@ -6,28 +6,23 @@
*/
/** Tests for MediaWiki languages/LanguageMl.php */
-class LanguageMlTest extends MediaWikiTestCase {
- private $lang;
+class LanguageMlTest extends LanguageClassesTestCase {
- function setUp() {
- $this->lang = Language::factory( 'Ml' );
- }
- function tearDown() {
- unset( $this->lang );
- }
-
- /** see bug 29495 */
- /** @dataProvider providerFormatNum*/
- function testFormatNum( $result, $value ) {
- $this->assertEquals( $result, $this->lang->formatNum( $value ) );
+ /**
+ * @dataProvider providerFormatNum
+ * @see bug 29495
+ * @covers Language::formatNum
+ */
+ public function testFormatNum( $result, $value ) {
+ $this->assertEquals( $result, $this->getLang()->formatNum( $value ) );
}
- function providerFormatNum() {
+ public static function providerFormatNum() {
return array(
- array( '12,34,567', '1234567' ),
+ array( '12,34,567', '1234567' ),
array( '12,345', '12345' ),
array( '1', '1' ),
- array( '123', '123' ) ,
+ array( '123', '123' ),
array( '1,234', '1234' ),
array( '12,345.56', '12345.56' ),
array( '12,34,56,79,81,23,45,678', '12345679812345678' ),
@@ -35,7 +30,7 @@ class LanguageMlTest extends MediaWikiTestCase {
array( '-12,00,000', '-1200000' ),
array( '-98', '-98' ),
array( '-98', -98 ),
- array( '-1,23,45,678', -12345678 ),
+ array( '-1,23,45,678', -12345678 ),
array( '', '' ),
array( '', null ),
);