mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 12:58:25 +01:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@44710 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7497d51b14
commit
9efcfbbf3f
@ -89,6 +89,8 @@ class Tests_Date_I18n extends WP_UnitTestCase {
|
||||
* @ticket 20973
|
||||
*/
|
||||
public function test_date_i18n_handles_shorthand_formats( $short, $full ) {
|
||||
update_option( 'timezone_string', 'America/Regina' );
|
||||
|
||||
$this->assertEquals( strtotime( date_i18n( $full ) ), strtotime( date_i18n( $short ) ), 'The dates should be equal', 2 );
|
||||
$this->assertEquals( $short, date_i18n( '\\' . $short ) );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user