- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions/numberFormatI18n.php
r47780 r48937 17 17 $GLOBALS['wp_locale'] = $locale; 18 18 19 $this->assert Equals( '123,457', $actual_1 );20 $this->assert Equals( '123,456.7890', $actual_2 );19 $this->assertSame( '123,457', $actual_1 ); 20 $this->assertSame( '123,456.7890', $actual_2 ); 21 21 } 22 22 … … 34 34 $GLOBALS['wp_locale']->number_format['thousands_sep'] = $thousands_sep; 35 35 36 $this->assert Equals( '123^457', $actual_1 );37 $this->assert Equals( '123^456@7890', $actual_2 );36 $this->assertSame( '123^457', $actual_1 ); 37 $this->assertSame( '123^456@7890', $actual_2 ); 38 38 } 39 39 40 40 public function test_should_default_to_en_us_format() { 41 $this->assert Equals( '123,457', number_format_i18n( 123456.789, 0 ) );42 $this->assert Equals( '123,456.7890', number_format_i18n( 123456.789, 4 ) );41 $this->assertSame( '123,457', number_format_i18n( 123456.789, 0 ) ); 42 $this->assertSame( '123,456.7890', number_format_i18n( 123456.789, 4 ) ); 43 43 } 44 44 45 45 public function test_should_handle_negative_precision() { 46 $this->assert Equals( '123,457', number_format_i18n( 123456.789, 0 ) );47 $this->assert Equals( '123,456.7890', number_format_i18n( 123456.789, -4 ) );46 $this->assertSame( '123,457', number_format_i18n( 123456.789, 0 ) ); 47 $this->assertSame( '123,456.7890', number_format_i18n( 123456.789, -4 ) ); 48 48 } 49 49 }
Note: See TracChangeset
for help on using the changeset viewer.