wiki.techinc.nl/tests/phpunit/languages/LanguageMlTest.php
addshore 46a17d0fc3 Cleanup /languages/* tests
This change:
 - Adds method scope
 - adds @covers tags
 - adds various @todos
 - fixes some comments

Before the changes tests ran with:
   1383 tests, 1412 assertions 10 skips
After changes the results remain the same

Change-Id: Iee57447bdb47026952ef5dcce6fed5dad0f80e52
2013-10-22 12:32:29 +02:00

38 lines
957 B
PHP

<?php
/**
* @author Santhosh Thottingal
* @copyright Copyright © 2011, Santhosh Thottingal
* @file
*/
/** Tests for MediaWiki languages/LanguageMl.php */
class LanguageMlTest extends LanguageClassesTestCase {
/**
* @dataProvider providerFormatNum
* @see bug 29495
* @covers Language::formatNum
*/
public function testFormatNum( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->formatNum( $value ) );
}
public static function providerFormatNum() {
return array(
array( '12,34,567', '1234567' ),
array( '12,345', '12345' ),
array( '1', '1' ),
array( '123', '123' ),
array( '1,234', '1234' ),
array( '12,345.56', '12345.56' ),
array( '12,34,56,79,81,23,45,678', '12345679812345678' ),
array( '.12345', '.12345' ),
array( '-12,00,000', '-1200000' ),
array( '-98', '-98' ),
array( '-98', -98 ),
array( '-1,23,45,678', -12345678 ),
array( '', '' ),
array( '', null ),
);
}
}