Changeset 1026 in tests
- Timestamp:
- 09/19/2012 08:26:42 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/post.php
r1021 r1026 344 344 } 345 345 346 /** 347 * @ticket 17180 348 */ 349 function test_vb_insert_invalid_date() { 350 // insert a post with an invalid date, make sure it fails 351 352 $post = array( 353 'post_author' => $this->author_id, 354 'post_status' => 'public', 355 'post_content' => rand_str(), 356 'post_title' => rand_str(), 357 'post_date' => '2012-02-30 00:00:00', 358 ); 359 360 $insert_post = wp_insert_post( $post ); 361 $this->assertTrue( is_wp_error( $insert_post ), 'Did not get a WP_Error back from wp_insert_post' ); 362 $this->assertEquals( 'invalid_date', $insert_post->get_error_code() ); 363 364 } 365 346 366 function test_vb_insert_future_change_to_private() { 347 367 // insert a future post, then edit and change it to private, and make sure cron gets it right
Note: See TracChangeset
for help on using the changeset viewer.