Changeset 47316
- Timestamp:
- 02/19/2020 02:57:05 AM (3 years ago)
- Location:
- branches/5.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.1
-
branches/5.1/tests/phpunit/tests/multisite/site.php
r44807 r47316 392 392 wpmu_update_blogs_date(); 393 393 394 // compare the update time with the current time, allow delta < 2395 $ blog = get_site( get_current_blog_id());396 $current_time = time(); 397 $time_difference = $current_time - strtotime( $blog->last_updated );398 $this->assert LessThan( 2, $time_difference);394 $blog = get_site( get_current_blog_id() ); 395 $current_time = time(); 396 397 // Compare the update time with the current time, allow delta < 2. 398 $this->assertEquals( $current_time, strtotime( $blog->last_updated ), 'The dates should be equal', 2 ); 399 399 } 400 400 … … 1755 1755 1756 1756 $site = get_site( $site_id ); 1757 $this->assertSame( $first_date, $site->registered);1758 $this->assertSame( $first_date, $site->last_updated);1757 $this->assertSame( strtotime( $first_date ), strtotime( $site->registered ), 'The dates should be equal', 2 ); 1758 $this->assertSame( strtotime( $first_date ), strtotime( $site->last_updated ), 'The dates should be equal', 2 ); 1759 1759 1760 1760 $second_date = current_time( 'mysql', true ); … … 1763 1763 1764 1764 $site = get_site( $site_id ); 1765 $this->assertSame( $first_date, $site->registered);1766 $this->assertSame( $second_date, $site->last_updated);1765 $this->assertSame( strtotime( $first_date ), strtotime( $site->registered ), 'The dates should be equal', 2 ); 1766 $this->assertSame( strtotime( $second_date ), strtotime( $site->last_updated ), 'The dates should be equal', 2 ); 1767 1767 } 1768 1768
Note: See TracChangeset
for help on using the changeset viewer.