Changeset 1246 in tests for trunk/tests/post.php
- Timestamp:
- 03/18/2013 02:28:37 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/post.php
r1240 r1246 606 606 $this->assertEquals( array( $parent_id ), get_post_ancestors( 0 ) ); 607 607 } 608 609 /** 610 * @ticket 23474 611 */ 612 function test_update_invalid_post_id() { 613 $post_id = $this->factory->post->create( array( 'post_name' => 'get-page-uri-post-name' ) ); 614 $post = get_post( $post_id, ARRAY_A ); 615 616 $post['ID'] = 123456789; 617 618 $this->assertEquals( 0, wp_insert_post( $post ) ); 619 $this->assertEquals( 0, wp_update_post( $post ) ); 620 621 $this->assertInstanceOf( 'WP_Error', wp_insert_post( $post, true ) ); 622 $this->assertInstanceOf( 'WP_Error', wp_update_post( $post, true ) ); 623 624 } 608 625 }
Note: See TracChangeset
for help on using the changeset viewer.