Date/Time: Remove incomplete and redundant test for get_post_time() added in [46580].

There is no functional difference between `gmt_offset` and `timezone_string` timezone modes for the issue.

Props Rarst.
Merges [46583] to the 5.3 branch.
Fixes #48384.

git-svn-id: https://develop.svn.wordpress.org/branches/5.3@46584 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2019-10-25 15:32:03 +00:00
parent dd27c37b82
commit 8c981316ac

View File

@ -63,30 +63,6 @@ class Tests_Date_Post_Time extends WP_UnitTestCase {
$this->assertEquals( $rfc3339_utc, get_post_modified_time( DATE_RFC3339, true, $post_id, true ) );
}
/**
* @ticket 48384
*/
public function test_should_keep_utc_time_on_timezone_change_with_gmt_offset() {
// Set the timezone to UTC+0.
update_option( 'gmt_offset', 0 );
$datetime = new DateTimeImmutable( 'now', new DateTimeZone( 'UTC' ) );
$mysql = $datetime->format( 'Y-m-d H:i:s' );
$rfc3339 = $datetime->format( DATE_RFC3339 );
$post_id = self::factory()->post->create(
array(
'post_date' => $mysql,
'post_modified' => $mysql,
)
);
// Change the timezone to UTC+2.
update_option( 'gmt_offset', 2 );
$this->assertEquals( $rfc3339, get_post_time( DATE_RFC3339, true, $post_id ) );
$this->assertEquals( $rfc3339, get_post_modified_time( DATE_RFC3339, true, $post_id ) );
}
/**
* @ticket 48384
*/