Debian Codegraph @

tests/phpunit/includes/languages/LanguageNlTest.php

raw symbols SCIP
1 <?php
2 /**
3 * @author Santhosh Thottingal
4 * @copyright Copyright © 2011, Santhosh Thottingal
5 * @file
6 */
7
8 /**
9 * @group Language
10 */
11 class LanguageNlTest extends LanguageClassesTestCase {
12
13 /**
14 * @covers \MediaWiki\Language\Language::formatNum
15 * @dataProvider provideFormatNum
16 */
17 public function testFormatNum( $unformatted, $formatted ) {
18 $this->assertEquals( $formatted, $this->getLang()->formatNum( $unformatted ) );
19 }
20
21 public static function provideFormatNum() {
22 return [
23 [ '1234567', '1.234.567' ],
24 [ '12345', '12.345' ],
25 [ '1', '1' ],
26 [ '123', '123' ],
27 [ '1234', '1.234' ],
28 [ '12345.56', '12.345,56' ],
29 [ '.1234556', ',1234556' ],
30 [ '12345679812345678', '12.345.679.812.345.678' ],
31 [ '.12345', ',12345' ],
32 [ '-1200000', '−1.200.000' ],
33 [ '-98', '−98' ],
34 [ -98, '−98' ],
35 [ -12345678, '−12.345.678' ],
36 [ '', '' ],
37 [ null, '' ]
38 ];
39 }
40 }