Make WordPress Core

Changeset 44710


Ignore:
Timestamp:
01/29/2019 01:19:30 AM (6 years ago)
Author:
pento
Message:

Tests: Fix the tests for the c and r formats in date_i18n().

To test the date_i18n() output correctly, the tests added in [43434] need to set a non-UTC timezone.

Props Rarst.
Fixes #20973.

File:
1 edited

Legend:

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

    r43562 r44710  
    9090     */
    9191    public function test_date_i18n_handles_shorthand_formats( $short, $full ) {
     92        update_option( 'timezone_string', 'America/Regina' );
     93
    9294        $this->assertEquals( strtotime( date_i18n( $full ) ), strtotime( date_i18n( $short ) ), 'The dates should be equal', 2 );
    9395        $this->assertEquals( $short, date_i18n( '\\' . $short ) );
Note: See TracChangeset for help on using the changeset viewer.