Changeset 31983 for trunk/tests/phpunit/tests/xmlrpc/wp/editPost.php
- Timestamp:
- 04/02/2015 03:48:41 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/wp/editPost.php
r27554 r31983 96 96 } 97 97 98 /** 99 * @ticket 24916 100 */ 101 function test_capable_reassign_author_to_self() { 102 $contributor_id = $this->make_user_by_role( 'contributor' ); 103 $editor_id = $this->make_user_by_role( 'editor' ); 104 105 $post = array( 'post_title' => 'Post test', 'post_author' => $contributor_id ); 106 $post_id = wp_insert_post( $post ); 107 108 $post2 = array( 'post_author' => $editor_id ); 109 $result = $this->myxmlrpcserver->wp_editPost( array( 1, 'editor', 'editor', $post_id, $post2 ) ); 110 $this->assertNotInstanceOf( 'IXR_Error', $result ); 111 $this->assertTrue($result); 112 113 $out = get_post( $post_id ); 114 $this->assertEquals( $editor_id, $out->post_author ); 115 } 116 98 117 function test_post_thumbnail() { 99 118 add_theme_support( 'post-thumbnails' );
Note: See TracChangeset
for help on using the changeset viewer.