Make WordPress Core


Ignore:
Timestamp:
01/03/2016 07:48:07 PM (11 years ago)
Author:
nacin
Message:

XML-RPC: Revert [34681] as it broke date handling.

props dossy, hnle, redsweater.
see #35053, #30429 (original ticket).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/xmlrpc/wp/newPost.php

    r35242 r36163  
    374374        }
    375375
    376         /**
    377          * @ticket 30429
    378          */
    379         function test_post_date_timezone_conversion() {
    380                 $tz = get_option( 'timezone_string' );
    381                 update_option( 'timezone_string', 'America/New_York' );
    382 
    383                 $this->make_user_by_role( 'author' );
    384                 $date_string = '1984-01-11 05:00:00';
    385                 $post = array( 'post_title' => 'test', 'post_content' => 'test', 'post_date' => $date_string );
    386                 $result = $this->myxmlrpcserver->wp_newPost( array( 1, 'author', 'author', $post ) );
    387                 $fetched_post = get_post( $result );
    388 
    389                 update_option( 'timezone_string', $tz );
    390 
    391                 $this->assertStringMatchesFormat( '%d', $result );
    392                 $this->assertEquals( $date_string , $fetched_post->post_date );
    393         }
    394376}
Note: See TracChangeset for help on using the changeset viewer.