summaryrefslogtreecommitdiff
path: root/tests/phpunit/languages/LanguageNlTest.php
blob: cf979cd24c2b676ed2710c17052e0f8327d42931 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
/**
 * @author Santhosh Thottingal
 * @copyright Copyright © 2011, Santhosh Thottingal
 * @file
 */

/** Tests for MediaWiki languages/LanguageNl.php */
class LanguageNlTest extends MediaWikiTestCase {
	private $lang;

	function setUp() {
		$this->lang = Language::factory( 'Nl' );
	}
	function tearDown() {
		unset( $this->lang );
	}

	function testFormatNum() {
		$this->assertEquals( '1.234.567', $this->lang->formatNum( '1234567' ) );
		$this->assertEquals( '12.345', $this->lang->formatNum( '12345' ) );
		$this->assertEquals( '1', $this->lang->formatNum( '1' ) );
		$this->assertEquals( '123', $this->lang->formatNum( '123' ) );
		$this->assertEquals( '1.234', $this->lang->formatNum( '1234' ) );
		$this->assertEquals( '12.345,56', $this->lang->formatNum( '12345.56' ) );
		$this->assertEquals( ',1234556', $this->lang->formatNum( '.1234556' ) );
	}
}