Changeset 54230 for trunk/tests/phpunit/tests/date/dateI18n.php
- Timestamp:
- 09/19/2022 11:51:20 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/date/dateI18n.php
r54217 r54230 107 107 108 108 $this->assertSame( '2012-12-01 00:00:00 CST -06:00 America/Regina', date_i18n( 'Y-m-d H:i:s T P e', strtotime( '2012-12-01 00:00:00' ) ) ); 109 } 110 111 /** 112 * Ensures that deprecated timezone strings are handled correctly. 113 * 114 * @ticket 56468 115 */ 116 public function test_adjusts_format_based_on_deprecated_timezone_string() { 117 update_option( 'timezone_string', 'America/Buenos_Aires' ); // This timezone was deprecated pre-PHP 5.6. 118 119 $expected = '2022-08-01 00:00:00 -03 -03:00 America/Buenos_Aires'; 120 if ( PHP_VERSION_ID < 70000 ) { 121 // PHP 5.6. 122 $expected = '2022-08-01 00:00:00 ART -03:00 America/Buenos_Aires'; 123 } 124 125 $this->assertSame( $expected, date_i18n( 'Y-m-d H:i:s T P e', strtotime( '2022-08-01 00:00:00' ) ) ); 109 126 } 110 127
Note: See TracChangeset
for help on using the changeset viewer.