XMLRPC: Improve the test case from [28854] so that it truely tests an invalid date string like the test name implies. See #28601.
git-svn-id: https://develop.svn.wordpress.org/trunk@29061 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f9b9039b79
commit
24852d4305
|
@ -310,7 +310,7 @@ class Tests_XMLRPC_wp_newPost extends WP_XMLRPC_UnitTestCase {
|
||||||
*/
|
*/
|
||||||
function test_invalid_post_date_does_not_fatal() {
|
function test_invalid_post_date_does_not_fatal() {
|
||||||
$this->make_user_by_role( 'author' );
|
$this->make_user_by_role( 'author' );
|
||||||
$date_string = '2014-01-01 10:10:10';
|
$date_string = 'invalid_date';
|
||||||
$post = array( 'post_title' => 'test', 'post_content' => 'test', 'post_date' => $date_string );
|
$post = array( 'post_title' => 'test', 'post_content' => 'test', 'post_date' => $date_string );
|
||||||
$result = $this->myxmlrpcserver->wp_newPost( array( 1, 'author', 'author', $post ) );
|
$result = $this->myxmlrpcserver->wp_newPost( array( 1, 'author', 'author', $post ) );
|
||||||
$fetched_post = get_post( $result );
|
$fetched_post = get_post( $result );
|
||||||
|
|
Loading…
Reference in New Issue