You appear to be a bot. Output may be restricted
Description
edit_post() should convert an existing auto-draft to a draft.
Usage
Tests_Admin_Includes_Post::test_edit_post_auto_draft();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/admin/includesPost.php
Lines:
1 to 14 of 14
function test_edit_post_auto_draft() { wp_set_current_user( self::$editor_id ); $post = self::factory()->post->create_and_get( array( 'post_status' => 'auto-draft' ) ); $this->assertEquals( 'auto-draft', $post->post_status ); $post_data = array( 'post_title' => 'Post title', 'content' => 'Post content', 'post_type' => 'post', 'post_ID' => $post->ID, ); edit_post( $post_data ); $this->assertEquals( 'draft', get_post( $post->ID )->post_status ); }