Changeset 34681 for trunk/tests/phpunit/tests/xmlrpc/mw/newPost.php
- Timestamp:
- 09/29/2015 04:04:16 AM (10 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/xmlrpc/mw/newPost.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/mw/newPost.php
r34572 r34681 181 181 $this->assertEquals( '0000-00-00 00:00:00', $out->post_date_gmt ); 182 182 } 183 184 /** 185 * @ticket 30429 186 */ 187 function test_post_date_timezone_conversion() { 188 $tz = get_option( 'timezone_string' ); 189 update_option( 'timezone_string', 'America/New_York' ); 190 191 $this->make_user_by_role( 'editor' ); 192 $date_string = '1984-01-11 05:00:00'; 193 $post = array( 194 'title' => 'test', 195 'post_content' => 'test', 196 'dateCreated' => new IXR_Date( mysql2date( 'Ymd\TH:i:s', $date_string, false ) ) 197 ); 198 $result = $this->myxmlrpcserver->mw_newPost( array( 1, 'editor', 'editor', $post ) ); 199 $fetched_post = get_post( $result ); 200 201 update_option( 'timezone_string', $tz ); 202 203 $this->assertStringMatchesFormat( '%d', $result ); 204 $this->assertEquals( $date_string , $fetched_post->post_date ); 205 } 183 206 }
Note: See TracChangeset
for help on using the changeset viewer.