Make WordPress Core


Ignore:
Timestamp:
01/17/2020 02:02:41 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Tests: Replace date() with gmdate() in WP_Test_REST_Posts_Controller tests.

Follow-up to [45424], [46252].

See #46438, #44491, #39953.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php

    r47037 r47080  
    46174617        wp_set_current_user( self::$superadmin_id );
    46184618
    4619         $time = date( 'Y-m-d H:i:s' );
     4619        $time = gmdate( 'Y-m-d H:i:s' );
    46204620
    46214621        $post = self::factory()->post->create_and_get(
     
    46524652        wp_set_current_user( self::$superadmin_id );
    46534653
    4654         $time     = date( 'Y-m-d H:i:s' );
    4655         $new_time = date( 'Y-m-d H:i:s', strtotime( '+1 week' ) );
     4654        $time     = gmdate( 'Y-m-d H:i:s' );
     4655        $new_time = gmdate( 'Y-m-d H:i:s', strtotime( '+1 week' ) );
    46564656
    46574657        $post = self::factory()->post->create_and_get(
     
    46944694        wp_set_current_user( self::$superadmin_id );
    46954695
    4696         $time = date( 'Y-m-d H:i:s' );
     4696        $time = gmdate( 'Y-m-d H:i:s' );
    46974697
    46984698        $post = self::factory()->post->create_and_get(
Note: See TracChangeset for help on using the changeset viewer.