You appear to be a bot. Output may be restricted
Description
Usage
Tests_XMLRPC_wp_newPost::test_invalid_post_date_does_not_fatal();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/xmlrpc/wp/newPost.php
Lines:
1 to 14 of 14
public function test_invalid_post_date_does_not_fatal() { $this->make_user_by_role( 'author' ); $date_string = 'invalid_date'; $post = array( 'post_title' => 'test', 'post_content' => 'test', 'post_date' => $date_string, ); $result = $this->myxmlrpcserver->wp_newPost( array( 1, 'author', 'author', $post ) ); $fetched_post = get_post( $result ); $this->assertStringMatchesFormat( '%d', $result ); $this->assertSame( current_time( 'Y-m-d' ), substr( $fetched_post->post_date, 0, 10 ) ); }