3 * @author Santhosh Thottingal
4 * @copyright Copyright © 2011, Santhosh Thottingal
11 class LanguageMlTest
extends LanguageClassesTestCase
{
14 * @dataProvider provideFormatNum
15 * @covers Language::formatNum
17 public function testFormatNum( $result, $value ) {
19 $this->assertEquals( $result, $this->getLang()->formatNum( $value ) );
22 public static function provideFormatNum() {
24 [ '12,34,567', '1234567' ],
25 [ '12,345', '12345' ],
29 [ '12,345.56', '12345.56' ],
30 [ '12,34,56,79,81,23,45,678', '12345679812345678' ],
31 [ '.12345', '.12345' ],
32 [ '-12,00,000', '-1200000' ],
35 [ '-1,23,45,678', -12345678 ],
42 * @covers LanguageMl::normalize
43 * @covers Language::normalize
44 * @dataProvider provideNormalize
46 public function testNormalize( $input, $expected ) {
47 if ( $input === $expected ) {
48 throw new Exception( 'Expected output must differ.' );
51 $this->setMwGlobals( 'wgFixMalayalamUnicode', true );
52 $this->assertSame( $expected, $this->getLang()->normalize( $input ), 'ml-normalised form' );
54 $this->setMwGlobals( 'wgFixMalayalamUnicode', false );
55 $this->hideDeprecated( '$wgFixMalayalamUnicode = false' );
56 $this->assertSame( $input, $this->getLang()->normalize( $input ), 'regular normalised form' );
59 public static function provideNormalize() {