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

See #48113.

git-svn-id: https://develop.svn.wordpress.org/trunk@46318 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2019-09-26 01:39:19 +00:00
parent f68fe85b41
commit 4f77abf6b9
1 changed files with 1 additions and 1 deletions

View File

@ -1428,6 +1428,6 @@ class Tests_Post extends WP_UnitTestCase {
);
$post = get_post( $post_id );
self::assertEquals( gmdate( 'Y-m-d H:i:s' ), $post->post_date_gmt );
self::assertEquals( strtotime( gmdate( 'Y-m-d H:i:s' ) ), strtotime( $post->post_date_gmt ), 'The dates should be equal', 2 );
}
}