Changeset 54516
- Timestamp:
- 10/14/2022 07:00:08 AM (2 years ago)
- Location:
- branches/5.6
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.6
-
branches/5.6/tests/phpunit/tests/date/currentTime.php
r48952 r54516 81 81 */ 82 82 public function test_should_return_wp_timestamp() { 83 update_option( 'timezone_string', 'Europe/ Kiev' );83 update_option( 'timezone_string', 'Europe/Helsinki' ); 84 84 85 85 $timestamp = time(); … … 106 106 */ 107 107 public function test_should_return_correct_local_time() { 108 update_option( 'timezone_string', 'Europe/ Kiev' );108 update_option( 'timezone_string', 'Europe/Helsinki' ); 109 109 110 110 $timestamp = time(); -
branches/5.6/tests/phpunit/tests/date/dateI18n.php
r48952 r54516 11 11 */ 12 12 public function test_should_return_current_time_on_invalid_timestamp() { 13 $timezone = 'Europe/ Kiev';13 $timezone = 'Europe/Helsinki'; 14 14 update_option( 'timezone_string', $timezone ); 15 15 … … 24 24 */ 25 25 public function test_should_handle_zero_timestamp() { 26 $timezone = 'Europe/ Kiev';26 $timezone = 'Europe/Helsinki'; 27 27 update_option( 'timezone_string', $timezone ); 28 28 … … 143 143 */ 144 144 public function test_should_return_wp_timestamp() { 145 update_option( 'timezone_string', 'Europe/ Kiev' );145 update_option( 'timezone_string', 'Europe/Helsinki' ); 146 146 147 147 $datetime = new DateTimeImmutable( 'now', wp_timezone() ); … … 193 193 public function dst_times() { 194 194 return array( 195 'Before DST start' => array( '2019-03-31 02:59:00', 'Europe/ Kiev' ),196 'After DST start' => array( '2019-03-31 04:01:00', 'Europe/ Kiev' ),197 'Before DST end' => array( '2019-10-27 02:59:00', 'Europe/ Kiev' ),198 'After DST end' => array( '2019-10-27 04:01:00', 'Europe/ Kiev' ),195 'Before DST start' => array( '2019-03-31 02:59:00', 'Europe/Helsinki' ), 196 'After DST start' => array( '2019-03-31 04:01:00', 'Europe/Helsinki' ), 197 'Before DST end' => array( '2019-10-27 02:59:00', 'Europe/Helsinki' ), 198 'After DST end' => array( '2019-10-27 04:01:00', 'Europe/Helsinki' ), 199 199 ); 200 200 } -
branches/5.6/tests/phpunit/tests/date/getFeedBuildDate.php
r48952 r54516 47 47 global $wp_query; 48 48 49 update_option( 'timezone_string', 'Europe/ Kiev' );49 update_option( 'timezone_string', 'Europe/Helsinki' ); 50 50 $datetime = new DateTimeImmutable( 'now', wp_timezone() ); 51 51 $datetime_utc = $datetime->setTimezone( new DateTimeZone( 'UTC' ) ); -
branches/5.6/tests/phpunit/tests/date/getPostTime.php
r48937 r54516 50 50 */ 51 51 public function test_should_return_wp_timestamp() { 52 $timezone = 'Europe/ Kiev';52 $timezone = 'Europe/Helsinki'; 53 53 update_option( 'timezone_string', $timezone ); 54 54 … … 79 79 */ 80 80 public function test_should_return_time() { 81 $timezone = 'Europe/ Kiev';81 $timezone = 'Europe/Helsinki'; 82 82 update_option( 'timezone_string', $timezone ); 83 83 … … 120 120 ); 121 121 122 update_option( 'timezone_string', 'Europe/ Kiev' );122 update_option( 'timezone_string', 'Europe/Helsinki' ); 123 123 124 124 $this->assertSame( $rfc3339, get_post_time( DATE_RFC3339, true, $post_id ) ); -
branches/5.6/tests/phpunit/tests/date/mysql2date.php
r48937 r54516 33 33 */ 34 34 function test_mysql2date_should_format_time() { 35 $timezone = 'Europe/ Kiev';35 $timezone = 'Europe/Helsinki'; 36 36 update_option( 'timezone_string', $timezone ); 37 37 $datetime = new DateTime( 'now', new DateTimeZone( $timezone ) ); … … 47 47 */ 48 48 function test_mysql2date_should_format_time_with_changed_time_zone() { 49 $timezone = 'Europe/ Kiev';49 $timezone = 'Europe/Helsinki'; 50 50 // phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set 51 51 date_default_timezone_set( $timezone ); … … 62 62 * @ticket 28992 63 63 */ 64 function test_mysql2date_should_return_wp_timestamp() {65 $timezone = 'Europe/ Kiev';64 public function test_mysql2date_should_return_wp_timestamp() { 65 $timezone = 'Europe/Helsinki'; 66 66 update_option( 'timezone_string', $timezone ); 67 67 $datetime = new DateTime( 'now', new DateTimeZone( $timezone ) ); … … 76 76 * @ticket 28992 77 77 */ 78 function test_mysql2date_should_return_unix_timestamp_for_gmt_time() {79 $timezone = 'Europe/ Kiev';78 public function test_mysql2date_should_return_unix_timestamp_for_gmt_time() { 79 $timezone = 'Europe/Helsinki'; 80 80 update_option( 'timezone_string', $timezone ); 81 81 $datetime = new DateTime( 'now', new DateTimeZone( 'UTC' ) ); -
branches/5.6/tests/phpunit/tests/date/query.php
r49606 r54516 556 556 */ 557 557 public function test_build_mysql_datetime_with_custom_timezone( $datetime, $expected, $default_to_max = false ) { 558 update_option( 'timezone_string', 'Europe/ Kiev' );558 update_option( 'timezone_string', 'Europe/Helsinki' ); 559 559 560 560 $q = new WP_Date_Query( array() ); … … 578 578 */ 579 579 public function test_build_mysql_datetime_with_relative_date() { 580 update_option( 'timezone_string', 'Europe/ Kiev' );580 update_option( 'timezone_string', 'Europe/Helsinki' ); 581 581 582 582 $q = new WP_Date_Query( array() ); -
branches/5.6/tests/phpunit/tests/date/wpTimezone.php
r48937 r54516 30 30 */ 31 31 public function test_should_return_timezone_string() { 32 update_option( 'timezone_string', 'Europe/ Kiev' );32 update_option( 'timezone_string', 'Europe/Helsinki' ); 33 33 34 $this->assertSame( 'Europe/ Kiev', wp_timezone_string() );34 $this->assertSame( 'Europe/Helsinki', wp_timezone_string() ); 35 35 36 36 $timezone = wp_timezone(); 37 37 38 $this->assertSame( 'Europe/ Kiev', $timezone->getName() );38 $this->assertSame( 'Europe/Helsinki', $timezone->getName() ); 39 39 } 40 40 -
branches/5.6/tests/phpunit/tests/date/xmlrpc.php
r48937 r54516 12 12 */ 13 13 public function test_date_new_post() { 14 $timezone = 'Europe/ Kiev';14 $timezone = 'Europe/Helsinki'; 15 15 update_option( 'timezone_string', $timezone ); 16 16 … … 130 130 */ 131 131 public function test_date_edit_post() { 132 $timezone = 'Europe/ Kiev';132 $timezone = 'Europe/Helsinki'; 133 133 update_option( 'timezone_string', $timezone ); 134 134 … … 196 196 * @ticket 30429 197 197 */ 198 function test_date_edit_comment() {199 $timezone = 'Europe/ Kiev';198 public function test_date_edit_comment() { 199 $timezone = 'Europe/Helsinki'; 200 200 update_option( 'timezone_string', $timezone ); 201 201 -
branches/5.6/tests/phpunit/tests/formatting/date.php
r48952 r54516 198 198 return array( 199 199 array( 200 'timezone_string' => 'Europe/ Kiev',200 'timezone_string' => 'Europe/Helsinki', 201 201 'gmt_offset' => 3, 202 202 ),
Note: See TracChangeset
for help on using the changeset viewer.