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:
Gary Pendergast 2019-01-29 01:19:30 +00:00
parent 7497d51b14
commit 9efcfbbf3f

View File

@ -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 ) );
}