diff --git a/tests/phpunit/tests/date/currentTime.php b/tests/phpunit/tests/date/currentTime.php index c98292ef0d..4a56098c93 100644 --- a/tests/phpunit/tests/date/currentTime.php +++ b/tests/phpunit/tests/date/currentTime.php @@ -81,7 +81,7 @@ class Tests_Date_CurrentTime extends WP_UnitTestCase { * @ticket 40653 */ public function test_should_return_wp_timestamp() { - update_option( 'timezone_string', 'Europe/Kiev' ); + update_option( 'timezone_string', 'Europe/Helsinki' ); $timestamp = time(); $datetime = new DateTime( '@' . $timestamp ); @@ -106,7 +106,7 @@ class Tests_Date_CurrentTime extends WP_UnitTestCase { * @ticket 40653 */ public function test_should_return_correct_local_time() { - update_option( 'timezone_string', 'Europe/Kiev' ); + update_option( 'timezone_string', 'Europe/Helsinki' ); $timestamp = time(); $datetime_local = new DateTime( '@' . $timestamp ); diff --git a/tests/phpunit/tests/date/dateI18n.php b/tests/phpunit/tests/date/dateI18n.php index 9279aca4eb..79598539cd 100644 --- a/tests/phpunit/tests/date/dateI18n.php +++ b/tests/phpunit/tests/date/dateI18n.php @@ -11,7 +11,7 @@ class Tests_Date_DateI18n extends WP_UnitTestCase { * @ticket 28636 */ public function test_should_return_current_time_on_invalid_timestamp() { - $timezone = 'Europe/Kiev'; + $timezone = 'Europe/Helsinki'; update_option( 'timezone_string', $timezone ); $datetime = new DateTime( 'now', new DateTimeZone( $timezone ) ); @@ -24,7 +24,7 @@ class Tests_Date_DateI18n extends WP_UnitTestCase { * @ticket 28636 */ public function test_should_handle_zero_timestamp() { - $timezone = 'Europe/Kiev'; + $timezone = 'Europe/Helsinki'; update_option( 'timezone_string', $timezone ); $datetime = DateTimeImmutable::createFromFormat( @@ -143,7 +143,7 @@ class Tests_Date_DateI18n extends WP_UnitTestCase { * @ticket 25768 */ public function test_should_return_wp_timestamp() { - update_option( 'timezone_string', 'Europe/Kiev' ); + update_option( 'timezone_string', 'Europe/Helsinki' ); $datetime = new DateTimeImmutable( 'now', wp_timezone() ); $timestamp = $datetime->getTimestamp(); @@ -193,10 +193,10 @@ class Tests_Date_DateI18n extends WP_UnitTestCase { public function dst_times() { return array( - 'Before DST start' => array( '2019-03-31 02:59:00', 'Europe/Kiev' ), - 'After DST start' => array( '2019-03-31 04:01:00', 'Europe/Kiev' ), - 'Before DST end' => array( '2019-10-27 02:59:00', 'Europe/Kiev' ), - 'After DST end' => array( '2019-10-27 04:01:00', 'Europe/Kiev' ), + 'Before DST start' => array( '2019-03-31 02:59:00', 'Europe/Helsinki' ), + 'After DST start' => array( '2019-03-31 04:01:00', 'Europe/Helsinki' ), + 'Before DST end' => array( '2019-10-27 02:59:00', 'Europe/Helsinki' ), + 'After DST end' => array( '2019-10-27 04:01:00', 'Europe/Helsinki' ), ); } } diff --git a/tests/phpunit/tests/date/getFeedBuildDate.php b/tests/phpunit/tests/date/getFeedBuildDate.php index 23d97aa473..c5dcc7ce2f 100644 --- a/tests/phpunit/tests/date/getFeedBuildDate.php +++ b/tests/phpunit/tests/date/getFeedBuildDate.php @@ -47,7 +47,7 @@ class Tests_Date_GetFeedBuildDate extends WP_UnitTestCase { public function test_should_fall_back_to_last_post_modified() { global $wp_query; - update_option( 'timezone_string', 'Europe/Kiev' ); + update_option( 'timezone_string', 'Europe/Helsinki' ); $datetime = new DateTimeImmutable( 'now', wp_timezone() ); $datetime_utc = $datetime->setTimezone( new DateTimeZone( 'UTC' ) ); diff --git a/tests/phpunit/tests/date/getPostTime.php b/tests/phpunit/tests/date/getPostTime.php index ad9eb0cf31..58cb4eb7fe 100644 --- a/tests/phpunit/tests/date/getPostTime.php +++ b/tests/phpunit/tests/date/getPostTime.php @@ -51,7 +51,7 @@ class Tests_Date_GetPostTime extends WP_UnitTestCase { * @ticket 25002 */ public function test_should_return_wp_timestamp() { - $timezone = 'Europe/Kiev'; + $timezone = 'Europe/Helsinki'; update_option( 'timezone_string', $timezone ); $datetime = new DateTimeImmutable( 'now', new DateTimeZone( $timezone ) ); @@ -80,7 +80,7 @@ class Tests_Date_GetPostTime extends WP_UnitTestCase { * @ticket 25002 */ public function test_should_return_time() { - $timezone = 'Europe/Kiev'; + $timezone = 'Europe/Helsinki'; update_option( 'timezone_string', $timezone ); $datetime = new DateTimeImmutable( 'now', new DateTimeZone( $timezone ) ); @@ -121,7 +121,7 @@ class Tests_Date_GetPostTime extends WP_UnitTestCase { ) ); - update_option( 'timezone_string', 'Europe/Kiev' ); + update_option( 'timezone_string', 'Europe/Helsinki' ); $this->assertSame( $rfc3339, get_post_time( DATE_RFC3339, true, $post_id ) ); $this->assertSame( $rfc3339, get_post_modified_time( DATE_RFC3339, true, $post_id ) ); diff --git a/tests/phpunit/tests/date/mysql2date.php b/tests/phpunit/tests/date/mysql2date.php index 7c83446b00..0054150a3e 100644 --- a/tests/phpunit/tests/date/mysql2date.php +++ b/tests/phpunit/tests/date/mysql2date.php @@ -33,7 +33,7 @@ class Tests_Date_mysql2date extends WP_UnitTestCase { * @ticket 28992 */ public function test_mysql2date_should_format_time() { - $timezone = 'Europe/Kiev'; + $timezone = 'Europe/Helsinki'; update_option( 'timezone_string', $timezone ); $datetime = new DateTime( 'now', new DateTimeZone( $timezone ) ); $rfc3339 = $datetime->format( DATE_RFC3339 ); @@ -47,7 +47,7 @@ class Tests_Date_mysql2date extends WP_UnitTestCase { * @ticket 28992 */ public function test_mysql2date_should_format_time_with_changed_time_zone() { - $timezone = 'Europe/Kiev'; + $timezone = 'Europe/Helsinki'; // phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set date_default_timezone_set( $timezone ); update_option( 'timezone_string', $timezone ); @@ -63,7 +63,7 @@ class Tests_Date_mysql2date extends WP_UnitTestCase { * @ticket 28992 */ public function test_mysql2date_should_return_wp_timestamp() { - $timezone = 'Europe/Kiev'; + $timezone = 'Europe/Helsinki'; update_option( 'timezone_string', $timezone ); $datetime = new DateTime( 'now', new DateTimeZone( $timezone ) ); $wp_timestamp = $datetime->getTimestamp() + $datetime->getOffset(); @@ -77,7 +77,7 @@ class Tests_Date_mysql2date extends WP_UnitTestCase { * @ticket 28992 */ public function test_mysql2date_should_return_unix_timestamp_for_gmt_time() { - $timezone = 'Europe/Kiev'; + $timezone = 'Europe/Helsinki'; update_option( 'timezone_string', $timezone ); $datetime = new DateTime( 'now', new DateTimeZone( 'UTC' ) ); $timestamp = $datetime->getTimestamp(); diff --git a/tests/phpunit/tests/date/query.php b/tests/phpunit/tests/date/query.php index e3f4ba0f6f..95a9782c8d 100644 --- a/tests/phpunit/tests/date/query.php +++ b/tests/phpunit/tests/date/query.php @@ -561,7 +561,7 @@ class Tests_Date_Query extends WP_UnitTestCase { * @param bool $default_to_max Flag to default missing values to max. */ public function test_build_mysql_datetime_with_custom_timezone( $datetime, $expected, $default_to_max = false ) { - update_option( 'timezone_string', 'Europe/Kiev' ); + update_option( 'timezone_string', 'Europe/Helsinki' ); $q = new WP_Date_Query( array() ); @@ -583,7 +583,7 @@ class Tests_Date_Query extends WP_UnitTestCase { * @ticket 41782 */ public function test_build_mysql_datetime_with_relative_date() { - update_option( 'timezone_string', 'Europe/Kiev' ); + update_option( 'timezone_string', 'Europe/Helsinki' ); $q = new WP_Date_Query( array() ); diff --git a/tests/phpunit/tests/date/wpTimezone.php b/tests/phpunit/tests/date/wpTimezone.php index 8b1f09e4d1..fdd369917b 100644 --- a/tests/phpunit/tests/date/wpTimezone.php +++ b/tests/phpunit/tests/date/wpTimezone.php @@ -31,13 +31,13 @@ class Tests_Date_wpTimezone extends WP_UnitTestCase { * @ticket 24730 */ public function test_should_return_timezone_string() { - update_option( 'timezone_string', 'Europe/Kiev' ); + update_option( 'timezone_string', 'Europe/Helsinki' ); - $this->assertSame( 'Europe/Kiev', wp_timezone_string() ); + $this->assertSame( 'Europe/Helsinki', wp_timezone_string() ); $timezone = wp_timezone(); - $this->assertSame( 'Europe/Kiev', $timezone->getName() ); + $this->assertSame( 'Europe/Helsinki', $timezone->getName() ); } /** diff --git a/tests/phpunit/tests/date/xmlrpc.php b/tests/phpunit/tests/date/xmlrpc.php index 8a4efaf46d..f00d88ff4c 100644 --- a/tests/phpunit/tests/date/xmlrpc.php +++ b/tests/phpunit/tests/date/xmlrpc.php @@ -24,7 +24,7 @@ class Tests_Date_XMLRPC extends WP_XMLRPC_UnitTestCase { $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); } - $timezone = 'Europe/Kiev'; + $timezone = 'Europe/Helsinki'; update_option( 'timezone_string', $timezone ); $datetime = new DateTimeImmutable( 'now', new DateTimeZone( $timezone ) ); @@ -144,7 +144,7 @@ class Tests_Date_XMLRPC extends WP_XMLRPC_UnitTestCase { * @covers wp_xmlrpc_server::mw_editPost */ public function test_date_edit_post() { - $timezone = 'Europe/Kiev'; + $timezone = 'Europe/Helsinki'; update_option( 'timezone_string', $timezone ); $datetime = new DateTimeImmutable( 'now', new DateTimeZone( $timezone ) ); @@ -213,7 +213,7 @@ class Tests_Date_XMLRPC extends WP_XMLRPC_UnitTestCase { * @covers wp_xmlrpc_server::wp_editComment */ public function test_date_edit_comment() { - $timezone = 'Europe/Kiev'; + $timezone = 'Europe/Helsinki'; update_option( 'timezone_string', $timezone ); $datetime = new DateTimeImmutable( 'now', new DateTimeZone( $timezone ) ); diff --git a/tests/phpunit/tests/formatting/date.php b/tests/phpunit/tests/formatting/date.php index 9f0f975d4c..0b10c8da19 100644 --- a/tests/phpunit/tests/formatting/date.php +++ b/tests/phpunit/tests/formatting/date.php @@ -197,7 +197,7 @@ class Tests_Formatting_Date extends WP_UnitTestCase { public function timezone_provider() { return array( array( - 'timezone_string' => 'Europe/Kiev', + 'timezone_string' => 'Europe/Helsinki', 'gmt_offset' => 3, ), array(