Make WordPress Core

Changeset 43562 for trunk


Ignore:
Timestamp:
08/11/2018 01:28:26 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Tests: Avoid a race condition in test_date_i18n_handles_shorthand_formats() by using a delta for comparing timestamps.

See #20973, #38381.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/date/dateI18n.php

    r43434 r43562  
    9090     */
    9191    public function test_date_i18n_handles_shorthand_formats( $short, $full ) {
    92         $this->assertEquals( date_i18n( $full ), date_i18n( $short ) );
     92        $this->assertEquals( strtotime( date_i18n( $full ) ), strtotime( date_i18n( $short ) ), 'The dates should be equal', 2 );
    9393        $this->assertEquals( $short, date_i18n( '\\' . $short ) );
    9494    }
Note: See TracChangeset for help on using the changeset viewer.