mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
See #48675. git-svn-id: https://develop.svn.wordpress.org/trunk@46785 602fd350-edb4-49c9-b593-d223f7449a82
41 lines
773 B
PHP
41 lines
773 B
PHP
<?php
|
|
|
|
/**
|
|
* @group date
|
|
* @group datetime
|
|
* @group feed
|
|
*/
|
|
class Tests_Date_Get_Feed_Build_Date extends WP_UnitTestCase {
|
|
|
|
function tearDown() {
|
|
global $wp_query;
|
|
|
|
update_option( 'timezone_string', 'UTC' );
|
|
|
|
unset( $wp_query );
|
|
|
|
parent::tearDown();
|
|
}
|
|
|
|
/**
|
|
* @ticket 48675
|
|
*/
|
|
public function test_should_return_correct_feed_build_date() {
|
|
global $wp_query;
|
|
|
|
$timezone = 'America/Chicago';
|
|
update_option( 'timezone_string', $timezone );
|
|
|
|
$post_id = self::factory()->post->create(
|
|
array(
|
|
'post_date' => '2018-07-22 21:13:23',
|
|
'post_date_gmt' => '2018-07-23 03:13:23',
|
|
)
|
|
);
|
|
|
|
$wp_query = new WP_Query( array( 'p' => $post_id ) );
|
|
|
|
$this->assertEquals( '2018-07-23T03:13:23+00:00', get_feed_build_date( DATE_RFC3339 ) );
|
|
}
|
|
}
|