MediaWiki
REL1_19
|
00001 <?php 00009 class LanguageMlTest extends MediaWikiTestCase { 00010 private $lang; 00011 00012 function setUp() { 00013 $this->lang = Language::factory( 'Ml' ); 00014 } 00015 function tearDown() { 00016 unset( $this->lang ); 00017 } 00018 00021 function testFormatNum( $result, $value ) { 00022 $this->assertEquals( $result, $this->lang->formatNum( $value ) ); 00023 } 00024 00025 function providerFormatNum() { 00026 return array( 00027 array( '12,34,567', '1234567' ), 00028 array( '12,345', '12345' ), 00029 array( '1', '1' ), 00030 array( '123', '123' ) , 00031 array( '1,234', '1234' ), 00032 array( '12,345.56', '12345.56' ), 00033 array( '12,34,56,79,81,23,45,678', '12345679812345678' ), 00034 array( '.12345', '.12345' ), 00035 array( '-12,00,000', '-1200000' ), 00036 array( '-98', '-98' ), 00037 array( '-98', -98 ), 00038 array( '-1,23,45,678', -12345678 ), 00039 array( '', '' ), 00040 array( '', null ), 00041 ); 00042 } 00043 }