Changeset 41920
- Timestamp:
- 10/18/2017 07:41:46 PM (8 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/formatting/date.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/date.php
r35284 r41920 82 82 update_option( 'timezone_string', 'Europe/London' ); 83 83 $local = 'now'; 84 $gmt = gmdate( 'Y-m-d H:i:s' , strtotime( 'now' ));85 $this->assertEquals( $gmt, get_gmt_from_date( $local ));84 $gmt = gmdate( 'Y-m-d H:i:s' ); 85 $this->assertEquals( strtotime( $gmt ), strtotime( get_gmt_from_date( $local ) ), 'The dates should be equal', 2 ); 86 86 } 87 87 … … 91 91 function test_get_gmt_from_date_string_date_no_timezone() { 92 92 $local = 'now'; 93 $gmt = gmdate( 'Y-m-d H:i:s' , strtotime( 'now' ));94 $this->assertEquals( $gmt, get_gmt_from_date( $local ));93 $gmt = gmdate( 'Y-m-d H:i:s' ); 94 $this->assertEquals( strtotime( $gmt ), strtotime( get_gmt_from_date( $local ) ), 'The dates should be equal', 2 ); 95 95 } 96 96 }
Note: See TracChangeset
for help on using the changeset viewer.