Changeset 28854 for trunk/tests/phpunit/tests/xmlrpc/wp/newPost.php
- Timestamp:
- 06/26/2014 05:42:17 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/wp/newPost.php
r25002 r28854 306 306 } 307 307 308 /** 309 * @ticket 28601 310 */ 311 function test_invalid_post_date_does_not_fatal() { 312 $this->make_user_by_role( 'author' ); 313 $date_string = '2014-01-01 10:10:10'; 314 $post = array( 'post_title' => 'test', 'post_content' => 'test', 'post_date' => $date_string ); 315 $result = $this->myxmlrpcserver->wp_newPost( array( 1, 'author', 'author', $post ) ); 316 $fetched_post = get_post( $result ); 317 $this->assertStringMatchesFormat( '%d', $result ); 318 } 319 320 /** 321 * @ticket 28601 322 */ 323 function test_invalid_post_date_gmt_does_not_fatal() { 324 $this->make_user_by_role( 'author' ); 325 $date_string = 'invalid date'; 326 $post = array( 'post_title' => 'test', 'post_content' => 'test', 'post_date_gmt' => $date_string ); 327 $result = $this->myxmlrpcserver->wp_newPost( array( 1, 'author', 'author', $post ) ); 328 $fetched_post = get_post( $result ); 329 $this->assertStringMatchesFormat( '%d', $result ); 330 } 331 308 332 }
Note: See TracChangeset
for help on using the changeset viewer.