You appear to be a bot. Output may be restricted
Description
Usage
Tests_Post::test_wp_insert_post_and_wp_publish_post_with_future_date();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/post.php
Lines:
1 to 20 of 20
function test_wp_insert_post_and_wp_publish_post_with_future_date() { $future_date = gmdate( 'Y-m-d H:i:s', time() + 10000000 ); $post_id = self::factory()->post->create( array( 'post_status' => 'publish', 'post_date' => $future_date, ) ); $post = get_post( $post_id ); $this->assertEquals( 'future', $post->post_status ); $this->assertEquals( $future_date, $post->post_date ); wp_publish_post( $post_id ); $post = get_post( $post_id ); $this->assertEquals( 'publish', $post->post_status ); $this->assertEquals( $future_date, $post->post_date ); }