diff --git a/tests/phpunit/tests/date/getFeedBuildDate.php b/tests/phpunit/tests/date/getFeedBuildDate.php index 455bfa0b80..afe5bbd1fa 100644 --- a/tests/phpunit/tests/date/getFeedBuildDate.php +++ b/tests/phpunit/tests/date/getFeedBuildDate.php @@ -61,9 +61,10 @@ class Tests_Date_Get_Feed_Build_Date extends WP_UnitTestCase { ); $this->assertEquals( - $datetime_utc->format( DATE_RFC3339 ), - get_feed_build_date( DATE_RFC3339 ), - 'Fall back to time of last post modified with no posts' + strtotime( $datetime_utc->format( DATE_RFC3339 ) ), + strtotime( get_feed_build_date( DATE_RFC3339 ) ), + 'Fall back to time of last post modified with no posts', + 2 ); $post_id_broken = $this->factory->post->create(); @@ -74,9 +75,10 @@ class Tests_Date_Get_Feed_Build_Date extends WP_UnitTestCase { $wp_query->posts = array( $post_broken ); $this->assertEquals( - $datetime_utc->format( DATE_RFC3339 ), - get_feed_build_date( DATE_RFC3339 ), - 'Fall back to time of last post modified with broken post object' + strtotime( $datetime_utc->format( DATE_RFC3339 ) ), + strtotime( get_feed_build_date( DATE_RFC3339 ) ), + 'Fall back to time of last post modified with broken post object', + 2 ); } }