WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.4/tests/phpunit/tests/xmlrpc/mw/newPost.php

    r35242 r36164  
    171171        $this->assertEquals( '0000-00-00 00:00:00', $out->post_date_gmt );
    172172    }
    173 
    174     /**
    175      * @ticket 30429
    176      */
    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     }
    196173}
Note: See TracChangeset for help on using the changeset viewer.