Merge "Chinese Conversion Table Update 2017-6"
[lhc/web/wiklou.git] / tests / phpunit / languages / classes / LanguageMlTest.php
1 <?php
2 /**
3 * @author Santhosh Thottingal
4 * @copyright Copyright © 2011, Santhosh Thottingal
5 * @file
6 */
7
8 /**
9 * @covers LanguageMl
10 */
11 class LanguageMlTest extends LanguageClassesTestCase {
12
13 /**
14 * @dataProvider providerFormatNum
15 * T31495
16 * @covers Language::formatNum
17 */
18 public function testFormatNum( $result, $value ) {
19 $this->assertEquals( $result, $this->getLang()->formatNum( $value ) );
20 }
21
22 public static function providerFormatNum() {
23 return [
24 [ '12,34,567', '1234567' ],
25 [ '12,345', '12345' ],
26 [ '1', '1' ],
27 [ '123', '123' ],
28 [ '1,234', '1234' ],
29 [ '12,345.56', '12345.56' ],
30 [ '12,34,56,79,81,23,45,678', '12345679812345678' ],
31 [ '.12345', '.12345' ],
32 [ '-12,00,000', '-1200000' ],
33 [ '-98', '-98' ],
34 [ '-98', -98 ],
35 [ '-1,23,45,678', -12345678 ],
36 [ '', '' ],
37 [ '', null ],
38 ];
39 }
40 }