wiki.techinc.nl/tests/phpunit/languages/classes/LanguageNlTest.php
C. Scott Ananian 5553106baf Use Unicode minus in output of {{formatnum}}
Bug: T10327
Change-Id: I4b315d439fef7d7cdf2fc5ae1904e0460a2a60e0
2020-11-16 18:08:31 +00:00

40 lines
927 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* @author Santhosh Thottingal
* @copyright Copyright © 2011, Santhosh Thottingal
* @file
*/
/** Tests for MediaWiki languages/LanguageNl.php
* @group Language
*/
class LanguageNlTest extends LanguageClassesTestCase {
/**
* @covers Language::formatNum
* @dataProvider provideFormatNum
*/
public function testFormatNum( $unformatted, $formatted ) {
$this->assertEquals( $formatted, $this->getLang()->formatNum( $unformatted ) );
}
public function provideFormatNum() {
return [
[ '1234567', '1.234.567' ],
[ '12345', '12.345' ],
[ '1', '1' ],
[ '123', '123' ],
[ '1234', '1.234' ],
[ '12345.56', '12.345,56' ],
[ '.1234556', ',1234556' ],
[ '12345679812345678', '12.345.679.812.345.678' ],
[ '.12345', ',12345' ],
[ '-1200000', '1.200.000' ],
[ '-98', '98' ],
[ -98, '98' ],
[ -12345678, '12.345.678' ],
[ '', '' ],
[ null, '' ]
];
}
}