You appear to be a bot. Output may be restricted
Description
Usage
Tests_Functions_NumberFormatI18n::test_should_respect_number_format_of_locale();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/functions/numberFormatI18n.php
Lines:
1 to 17 of 17
public function test_should_respect_number_format_of_locale() { $decimal_point = $GLOBALS['wp_locale']->number_format['decimal_point']; $thousands_sep = $GLOBALS['wp_locale']->number_format['thousands_sep']; $GLOBALS['wp_locale']->number_format['decimal_point'] = '@'; $GLOBALS['wp_locale']->number_format['thousands_sep'] = '^'; $actual_1 = number_format_i18n( 123456.789, 0 ); $actual_2 = number_format_i18n( 123456.789, 4 ); $GLOBALS['wp_locale']->number_format['decimal_point'] = $decimal_point; $GLOBALS['wp_locale']->number_format['thousands_sep'] = $thousands_sep; $this->assertSame( '123^457', $actual_1 ); $this->assertSame( '123^456@7890', $actual_2 ); }