Changeset 36163 for trunk/tests/phpunit/tests/xmlrpc/mw/newPost.php
- Timestamp:
- 01/03/2016 07:48:07 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/mw/newPost.php
r35242 r36163 171 171 $this->assertEquals( '0000-00-00 00:00:00', $out->post_date_gmt ); 172 172 } 173 174 /**175 * @ticket 30429176 */177 function test_post_date_timezone_conversion() {178 $tz = get_option( 'timezone_string' );179 update_option( 'timezone_string', 'America/New_York' );180 181 $this->make_user_by_role( 'editor' );182 $date_string = '1984-01-11 05:00:00';183 $post = array(184 'title' => 'test',185 'post_content' => 'test',186 'dateCreated' => new IXR_Date( mysql2date( 'Ymd\TH:i:s', $date_string, false ) )187 );188 $result = $this->myxmlrpcserver->mw_newPost( array( 1, 'editor', 'editor', $post ) );189 $fetched_post = get_post( $result );190 191 update_option( 'timezone_string', $tz );192 193 $this->assertStringMatchesFormat( '%d', $result );194 $this->assertEquals( $date_string , $fetched_post->post_date );195 }196 173 }
Note: See TracChangeset
for help on using the changeset viewer.