MediaWiki REL1_31
LanguageMlTest.php
Go to the documentation of this file.
1<?php
12
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}
Helping class to run tests using a clean language instance.
static providerFormatNum()
testFormatNum( $result, $value)
providerFormatNum T31495 Language::formatNum