Changeset 47313
- Timestamp:
- 02/19/2020 02:41:53 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/multisite/site.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/multisite/site.php
r47122 r47313 406 406 wpmu_update_blogs_date(); 407 407 408 $blog = get_site( get_current_blog_id() ); 409 $current_time = time(); 410 408 411 // Compare the update time with the current time, allow delta < 2. 409 $blog = get_site( get_current_blog_id() ); 410 $current_time = time(); 411 $time_difference = $current_time - strtotime( $blog->last_updated ); 412 $this->assertLessThan( 2, $time_difference ); 412 $this->assertEquals( $current_time, strtotime( $blog->last_updated ), 'The dates should be equal', 2 ); 413 413 } 414 414 … … 1767 1767 1768 1768 $site = get_site( $site_id ); 1769 $this->assertSame( $first_date, $site->registered);1770 $this->assertSame( $first_date, $site->last_updated);1769 $this->assertSame( strtotime( $first_date ), strtotime( $site->registered ), 'The dates should be equal', 2 ); 1770 $this->assertSame( strtotime( $first_date ), strtotime( $site->last_updated ), 'The dates should be equal', 2 ); 1771 1771 1772 1772 $second_date = current_time( 'mysql', true ); … … 1775 1775 1776 1776 $site = get_site( $site_id ); 1777 $this->assertSame( $first_date, $site->registered);1778 $this->assertSame( $second_date, $site->last_updated);1777 $this->assertSame( strtotime( $first_date ), strtotime( $site->registered ), 'The dates should be equal', 2 ); 1778 $this->assertSame( strtotime( $second_date ), strtotime( $site->last_updated ), 'The dates should be equal', 2 ); 1779 1779 } 1780 1780
Note: See TracChangeset
for help on using the changeset viewer.