diff --git a/tests/phpunit/tests/xmlrpc/wp/newPost.php b/tests/phpunit/tests/xmlrpc/wp/newPost.php index 27a164564a..7e37333254 100644 --- a/tests/phpunit/tests/xmlrpc/wp/newPost.php +++ b/tests/phpunit/tests/xmlrpc/wp/newPost.php @@ -355,7 +355,7 @@ class Tests_XMLRPC_wp_newPost extends WP_XMLRPC_UnitTestCase { $result = $this->myxmlrpcserver->wp_newPost( array( 1, 'author', 'author', $post ) ); $fetched_post = get_post( $result ); $this->assertStringMatchesFormat( '%d', $result ); - $this->assertEquals( '1970-01-01 00:00:00', $fetched_post->post_date ); + $this->assertEquals( current_time( 'Y-m-d' ), substr( $fetched_post->post_date, 0, 10 ) ); } /** @@ -363,7 +363,7 @@ class Tests_XMLRPC_wp_newPost extends WP_XMLRPC_UnitTestCase { */ function test_invalid_post_date_gmt_does_not_fatal() { $this->make_user_by_role( 'author' ); - $date_string = 'invalid date'; + $date_string = 'invalid_date'; $post = array( 'post_title' => 'test', 'post_content' => 'test', @@ -372,7 +372,7 @@ class Tests_XMLRPC_wp_newPost extends WP_XMLRPC_UnitTestCase { $result = $this->myxmlrpcserver->wp_newPost( array( 1, 'author', 'author', $post ) ); $fetched_post = get_post( $result ); $this->assertStringMatchesFormat( '%d', $result ); - $this->assertEquals( '1970-01-01 00:00:00', $fetched_post->post_date_gmt ); + $this->assertEquals( '0000-00-00', substr( $fetched_post->post_date_gmt, 0, 10 ) ); } /**