- Timestamp:
- 09/19/2022 09:18:59 PM (2 years ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/date/currentTime.php
r54207 r54217 93 93 */ 94 94 public function test_should_return_wp_timestamp() { 95 update_option( 'timezone_string', 'Europe/ Kiev' );95 update_option( 'timezone_string', 'Europe/Helsinki' ); 96 96 97 97 $timestamp = time(); … … 118 118 */ 119 119 public function test_should_return_correct_local_time() { 120 update_option( 'timezone_string', 'Europe/ Kiev' );120 update_option( 'timezone_string', 'Europe/Helsinki' ); 121 121 122 122 $timestamp = time(); -
trunk/tests/phpunit/tests/date/dateI18n.php
r54207 r54217 23 23 */ 24 24 public function test_should_return_current_time_on_invalid_timestamp() { 25 $timezone = 'Europe/ Kiev';25 $timezone = 'Europe/Helsinki'; 26 26 update_option( 'timezone_string', $timezone ); 27 27 … … 36 36 */ 37 37 public function test_should_handle_zero_timestamp() { 38 $timezone = 'Europe/ Kiev';38 $timezone = 'Europe/Helsinki'; 39 39 update_option( 'timezone_string', $timezone ); 40 40 … … 155 155 */ 156 156 public function test_should_return_wp_timestamp() { 157 update_option( 'timezone_string', 'Europe/ Kiev' );157 update_option( 'timezone_string', 'Europe/Helsinki' ); 158 158 159 159 $datetime = new DateTimeImmutable( 'now', wp_timezone() ); … … 205 205 public function dst_times() { 206 206 return array( 207 'Before DST start' => array( '2019-03-31 02:59:00', 'Europe/ Kiev' ),208 'After DST start' => array( '2019-03-31 04:01:00', 'Europe/ Kiev' ),209 'Before DST end' => array( '2019-10-27 02:59:00', 'Europe/ Kiev' ),210 'After DST end' => array( '2019-10-27 04:01:00', 'Europe/ Kiev' ),207 'Before DST start' => array( '2019-03-31 02:59:00', 'Europe/Helsinki' ), 208 'After DST start' => array( '2019-03-31 04:01:00', 'Europe/Helsinki' ), 209 'Before DST end' => array( '2019-10-27 02:59:00', 'Europe/Helsinki' ), 210 'After DST end' => array( '2019-10-27 04:01:00', 'Europe/Helsinki' ), 211 211 ); 212 212 } -
trunk/tests/phpunit/tests/date/getFeedBuildDate.php
r54207 r54217 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' ) ); -
trunk/tests/phpunit/tests/date/getPostTime.php
r54207 r54217 62 62 */ 63 63 public function test_should_return_wp_timestamp() { 64 $timezone = 'Europe/ Kiev';64 $timezone = 'Europe/Helsinki'; 65 65 update_option( 'timezone_string', $timezone ); 66 66 … … 91 91 */ 92 92 public function test_should_return_time() { 93 $timezone = 'Europe/ Kiev';93 $timezone = 'Europe/Helsinki'; 94 94 update_option( 'timezone_string', $timezone ); 95 95 … … 132 132 ); 133 133 134 update_option( 'timezone_string', 'Europe/ Kiev' );134 update_option( 'timezone_string', 'Europe/Helsinki' ); 135 135 136 136 $this->assertSame( $rfc3339, get_post_time( DATE_RFC3339, true, $post_id ) ); -
trunk/tests/phpunit/tests/date/mysql2date.php
r54207 r54217 37 37 */ 38 38 public function test_mysql2date_should_format_time() { 39 $timezone = 'Europe/ Kiev';39 $timezone = 'Europe/Helsinki'; 40 40 update_option( 'timezone_string', $timezone ); 41 41 $datetime = new DateTime( 'now', new DateTimeZone( $timezone ) ); … … 51 51 */ 52 52 public function test_mysql2date_should_format_time_with_changed_time_zone() { 53 $timezone = 'Europe/ Kiev';53 $timezone = 'Europe/Helsinki'; 54 54 // phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set 55 55 date_default_timezone_set( $timezone ); … … 67 67 */ 68 68 public function test_mysql2date_should_return_wp_timestamp() { 69 $timezone = 'Europe/ Kiev';69 $timezone = 'Europe/Helsinki'; 70 70 update_option( 'timezone_string', $timezone ); 71 71 $datetime = new DateTime( 'now', new DateTimeZone( $timezone ) ); … … 81 81 */ 82 82 public function test_mysql2date_should_return_unix_timestamp_for_gmt_time() { 83 $timezone = 'Europe/ Kiev';83 $timezone = 'Europe/Helsinki'; 84 84 update_option( 'timezone_string', $timezone ); 85 85 $datetime = new DateTime( 'now', new DateTimeZone( 'UTC' ) ); -
trunk/tests/phpunit/tests/date/query.php
r54207 r54217 572 572 */ 573 573 public function test_build_mysql_datetime_with_custom_timezone( $datetime, $expected, $default_to_max = false ) { 574 update_option( 'timezone_string', 'Europe/ Kiev' );574 update_option( 'timezone_string', 'Europe/Helsinki' ); 575 575 576 576 $q = new WP_Date_Query( array() ); … … 594 594 */ 595 595 public function test_build_mysql_datetime_with_relative_date() { 596 update_option( 'timezone_string', 'Europe/ Kiev' );596 update_option( 'timezone_string', 'Europe/Helsinki' ); 597 597 598 598 $q = new WP_Date_Query( array() ); -
trunk/tests/phpunit/tests/date/wpTimezone.php
r54207 r54217 43 43 */ 44 44 public function test_should_return_timezone_string() { 45 update_option( 'timezone_string', 'Europe/ Kiev' );45 update_option( 'timezone_string', 'Europe/Helsinki' ); 46 46 47 $this->assertSame( 'Europe/ Kiev', wp_timezone_string() );47 $this->assertSame( 'Europe/Helsinki', wp_timezone_string() ); 48 48 49 49 $timezone = wp_timezone(); 50 50 51 $this->assertSame( 'Europe/ Kiev', $timezone->getName() );51 $this->assertSame( 'Europe/Helsinki', $timezone->getName() ); 52 52 } 53 53 -
trunk/tests/phpunit/tests/date/xmlrpc.php
r54207 r54217 35 35 } 36 36 37 $timezone = 'Europe/ Kiev';37 $timezone = 'Europe/Helsinki'; 38 38 update_option( 'timezone_string', $timezone ); 39 39 … … 155 155 */ 156 156 public function test_date_edit_post() { 157 $timezone = 'Europe/ Kiev';157 $timezone = 'Europe/Helsinki'; 158 158 update_option( 'timezone_string', $timezone ); 159 159 … … 224 224 */ 225 225 public function test_date_edit_comment() { 226 $timezone = 'Europe/ Kiev';226 $timezone = 'Europe/Helsinki'; 227 227 update_option( 'timezone_string', $timezone ); 228 228 -
trunk/tests/phpunit/tests/formatting/date.php
r54207 r54217 234 234 return array( 235 235 array( 236 'timezone_string' => 'Europe/ Kiev',236 'timezone_string' => 'Europe/Helsinki', 237 237 'gmt_offset' => 3, 238 238 ),
Note: See TracChangeset
for help on using the changeset viewer.