Changeset 34681 for trunk/tests/phpunit/tests/xmlrpc/mw/editPost.php
- Timestamp:
- 09/29/2015 04:04:16 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/mw/editPost.php
r33612 r34681 230 230 $this->assertEquals( $result->code, 401 ); 231 231 } 232 233 /** 234 * @ticket 30429 235 */ 236 function test_post_date_timezone_conversion() { 237 $tz = get_option( 'timezone_string' ); 238 update_option( 'timezone_string', 'America/New_York' ); 239 240 $editor_id = $this->make_user_by_role( 'editor' ); 241 242 $post_id = $this->factory->post->create( array( 243 'post_author' => $editor_id 244 ) ); 245 246 $date_string = '1984-01-11 05:00:00'; 247 $result = $this->myxmlrpcserver->mw_editPost( array( $post_id, 'editor', 'editor', array( 248 'dateCreated' => new IXR_Date( mysql2date( 'Ymd\TH:i:s', $date_string, false ) ), 249 ) ) ); 250 251 $fetched_post = get_post( $post_id ); 252 253 update_option( 'timezone_string', $tz ); 254 255 $this->assertTrue( $result ); 256 $this->assertEquals( $date_string, $fetched_post->post_date ); 257 } 232 258 }
Note: See TracChangeset
for help on using the changeset viewer.