Changeset 54515 for branches/5.7
- Timestamp:
- 10/14/2022 06:57:57 AM (2 years ago)
- Location:
- branches/5.7
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.7
-
branches/5.7/tests/phpunit/tests/date/currentTime.php
r50291 r54515 82 82 */ 83 83 public function test_should_return_wp_timestamp() { 84 update_option( 'timezone_string', 'Europe/ Kiev' );84 update_option( 'timezone_string', 'Europe/Helsinki' ); 85 85 86 86 $timestamp = time(); … … 107 107 */ 108 108 public function test_should_return_correct_local_time() { 109 update_option( 'timezone_string', 'Europe/ Kiev' );109 update_option( 'timezone_string', 'Europe/Helsinki' ); 110 110 111 111 $timestamp = time(); -
branches/5.7/tests/phpunit/tests/date/dateI18n.php
r50291 r54515 12 12 */ 13 13 public function test_should_return_current_time_on_invalid_timestamp() { 14 $timezone = 'Europe/ Kiev';14 $timezone = 'Europe/Helsinki'; 15 15 update_option( 'timezone_string', $timezone ); 16 16 … … 25 25 */ 26 26 public function test_should_handle_zero_timestamp() { 27 $timezone = 'Europe/ Kiev';27 $timezone = 'Europe/Helsinki'; 28 28 update_option( 'timezone_string', $timezone ); 29 29 … … 144 144 */ 145 145 public function test_should_return_wp_timestamp() { 146 update_option( 'timezone_string', 'Europe/ Kiev' );146 update_option( 'timezone_string', 'Europe/Helsinki' ); 147 147 148 148 $datetime = new DateTimeImmutable( 'now', wp_timezone() ); … … 194 194 public function dst_times() { 195 195 return array( 196 'Before DST start' => array( '2019-03-31 02:59:00', 'Europe/ Kiev' ),197 'After DST start' => array( '2019-03-31 04:01:00', 'Europe/ Kiev' ),198 'Before DST end' => array( '2019-10-27 02:59:00', 'Europe/ Kiev' ),199 'After DST end' => array( '2019-10-27 04:01:00', 'Europe/ Kiev' ),196 'Before DST start' => array( '2019-03-31 02:59:00', 'Europe/Helsinki' ), 197 'After DST start' => array( '2019-03-31 04:01:00', 'Europe/Helsinki' ), 198 'Before DST end' => array( '2019-10-27 02:59:00', 'Europe/Helsinki' ), 199 'After DST end' => array( '2019-10-27 04:01:00', 'Europe/Helsinki' ), 200 200 ); 201 201 } -
branches/5.7/tests/phpunit/tests/date/getFeedBuildDate.php
r50291 r54515 48 48 global $wp_query; 49 49 50 update_option( 'timezone_string', 'Europe/ Kiev' );50 update_option( 'timezone_string', 'Europe/Helsinki' ); 51 51 $datetime = new DateTimeImmutable( 'now', wp_timezone() ); 52 52 $datetime_utc = $datetime->setTimezone( new DateTimeZone( 'UTC' ) ); -
branches/5.7/tests/phpunit/tests/date/getPostTime.php
r50291 r54515 52 52 */ 53 53 public function test_should_return_wp_timestamp() { 54 $timezone = 'Europe/ Kiev';54 $timezone = 'Europe/Helsinki'; 55 55 update_option( 'timezone_string', $timezone ); 56 56 … … 81 81 */ 82 82 public function test_should_return_time() { 83 $timezone = 'Europe/ Kiev';83 $timezone = 'Europe/Helsinki'; 84 84 update_option( 'timezone_string', $timezone ); 85 85 … … 122 122 ); 123 123 124 update_option( 'timezone_string', 'Europe/ Kiev' );124 update_option( 'timezone_string', 'Europe/Helsinki' ); 125 125 126 126 $this->assertSame( $rfc3339, get_post_time( DATE_RFC3339, true, $post_id ) ); -
branches/5.7/tests/phpunit/tests/date/mysql2date.php
r50279 r54515 34 34 */ 35 35 function test_mysql2date_should_format_time() { 36 $timezone = 'Europe/ Kiev';36 $timezone = 'Europe/Helsinki'; 37 37 update_option( 'timezone_string', $timezone ); 38 38 $datetime = new DateTime( 'now', new DateTimeZone( $timezone ) ); … … 48 48 */ 49 49 function test_mysql2date_should_format_time_with_changed_time_zone() { 50 $timezone = 'Europe/ Kiev';50 $timezone = 'Europe/Helsinki'; 51 51 // phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set 52 52 date_default_timezone_set( $timezone ); … … 63 63 * @ticket 28992 64 64 */ 65 function test_mysql2date_should_return_wp_timestamp() {66 $timezone = 'Europe/ Kiev';65 public function test_mysql2date_should_return_wp_timestamp() { 66 $timezone = 'Europe/Helsinki'; 67 67 update_option( 'timezone_string', $timezone ); 68 68 $datetime = new DateTime( 'now', new DateTimeZone( $timezone ) ); … … 77 77 * @ticket 28992 78 78 */ 79 function test_mysql2date_should_return_unix_timestamp_for_gmt_time() {80 $timezone = 'Europe/ Kiev';79 public function test_mysql2date_should_return_unix_timestamp_for_gmt_time() { 80 $timezone = 'Europe/Helsinki'; 81 81 update_option( 'timezone_string', $timezone ); 82 82 $datetime = new DateTime( 'now', new DateTimeZone( 'UTC' ) ); -
branches/5.7/tests/phpunit/tests/date/query.php
r50291 r54515 562 562 */ 563 563 public function test_build_mysql_datetime_with_custom_timezone( $datetime, $expected, $default_to_max = false ) { 564 update_option( 'timezone_string', 'Europe/ Kiev' );564 update_option( 'timezone_string', 'Europe/Helsinki' ); 565 565 566 566 $q = new WP_Date_Query( array() ); … … 584 584 */ 585 585 public function test_build_mysql_datetime_with_relative_date() { 586 update_option( 'timezone_string', 'Europe/ Kiev' );586 update_option( 'timezone_string', 'Europe/Helsinki' ); 587 587 588 588 $q = new WP_Date_Query( array() ); -
branches/5.7/tests/phpunit/tests/date/wpTimezone.php
r50291 r54515 32 32 */ 33 33 public function test_should_return_timezone_string() { 34 update_option( 'timezone_string', 'Europe/ Kiev' );34 update_option( 'timezone_string', 'Europe/Helsinki' ); 35 35 36 $this->assertSame( 'Europe/ Kiev', wp_timezone_string() );36 $this->assertSame( 'Europe/Helsinki', wp_timezone_string() ); 37 37 38 38 $timezone = wp_timezone(); 39 39 40 $this->assertSame( 'Europe/ Kiev', $timezone->getName() );40 $this->assertSame( 'Europe/Helsinki', $timezone->getName() ); 41 41 } 42 42 -
branches/5.7/tests/phpunit/tests/date/xmlrpc.php
r50279 r54515 15 15 */ 16 16 public function test_date_new_post() { 17 $timezone = 'Europe/ Kiev';17 $timezone = 'Europe/Helsinki'; 18 18 update_option( 'timezone_string', $timezone ); 19 19 … … 135 135 */ 136 136 public function test_date_edit_post() { 137 $timezone = 'Europe/ Kiev';137 $timezone = 'Europe/Helsinki'; 138 138 update_option( 'timezone_string', $timezone ); 139 139 … … 203 203 * @covers wp_xmlrpc_server::wp_editComment 204 204 */ 205 function test_date_edit_comment() {206 $timezone = 'Europe/ Kiev';205 public function test_date_edit_comment() { 206 $timezone = 'Europe/Helsinki'; 207 207 update_option( 'timezone_string', $timezone ); 208 208 -
branches/5.7/tests/phpunit/tests/formatting/date.php
r48952 r54515 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.