parent
a070a7f6d6
commit
75c55c0442
|
@ -531,15 +531,9 @@ class WC_Tests_Formatting_Functions extends WC_Unit_Test_Case {
|
|||
delete_option( 'gmt_offset' );
|
||||
$this->assertEquals( 'UTC', wc_timezone_string() );
|
||||
|
||||
// test with manually set UTC offset. Will differ based on current DST!
|
||||
// test with manually set UTC offset
|
||||
update_option( 'gmt_offset', -4 );
|
||||
$is_dst = (bool) date( 'I' );
|
||||
|
||||
if ( $is_dst ) {
|
||||
$this->assertEquals( 'America/Boa_Vista', wc_timezone_string() );
|
||||
} else {
|
||||
$this->assertEquals( 'America/Halifax', wc_timezone_string() );
|
||||
}
|
||||
$this->assertEquals( 'America/Halifax', wc_timezone_string() );
|
||||
|
||||
// test with invalid offset
|
||||
update_option( 'gmt_offset', 99 );
|
||||
|
|
Loading…
Reference in New Issue