Changeset 34572
- Timestamp:
- 09/26/2015 03:37:53 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r34570 r34572 4932 4932 $post_date_gmt = iso8601_to_datetime($dateCreated, 'GMT'); 4933 4933 } else { 4934 $post_date = current_time('mysql');4935 $post_date_gmt = current_time('mysql', 1);4934 $post_date = ''; 4935 $post_date_gmt = ''; 4936 4936 } 4937 4937 -
trunk/tests/phpunit/tests/xmlrpc/mw/newPost.php
r25002 r34572 160 160 } 161 161 162 163 /** 164 * @ticket 16985 165 */ 166 function test_draft_post_date() { 167 $this->make_user_by_role( 'editor' ); 168 169 $post = array( 170 'title' => 'Test', 171 'post_type' => 'post', 172 'post_status' => 'draft' 173 ); 174 $result = $this->myxmlrpcserver->mw_newPost( array( 1, 'editor', 'editor', $post ) ); 175 $this->assertNotInstanceOf( 'IXR_Error', $result ); 176 $this->assertStringMatchesFormat( '%d', $result ); 177 178 $out = get_post( $result ); 179 $this->assertEquals( 'post', $out->post_type ); 180 $this->assertEquals( 'draft', $out->post_status ); 181 $this->assertEquals( '0000-00-00 00:00:00', $out->post_date_gmt ); 182 } 162 183 }
Note: See TracChangeset
for help on using the changeset viewer.