WordPress.org

Make WordPress Core

Changeset 46318


Ignore:
Timestamp:
09/26/2019 01:39:19 AM (2 months ago)
Author:
SergeyBiryukov
Message:

REST API: Use delta comparison for floating date test added in [46279] to avoid race conditions.

See #48113.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post.php

    r46279 r46318  
    14291429
    14301430        $post = get_post( $post_id );
    1431         self::assertEquals( gmdate( 'Y-m-d H:i:s' ), $post->post_date_gmt );
     1431        self::assertEquals( strtotime( gmdate( 'Y-m-d H:i:s' ) ), strtotime( $post->post_date_gmt ), 'The dates should be equal', 2 );
    14321432    }
    14331433}
Note: See TracChangeset for help on using the changeset viewer.