Changeset 47492
- Timestamp:
- 03/22/2020 02:44:14 PM (5 years ago)
- Location:
- branches/3.7
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.7
-
branches/3.7/tests/phpunit/includes/testcase.php
r47343 r47492 163 163 } 164 164 } 165 165 166 166 function flush_cache() { 167 167 global $wp_object_cache; … … 466 466 return $files; 467 467 } 468 469 /** 470 * Helper to Convert a microtime string into a float 471 */ 472 protected function _microtime_to_float($microtime ){ 473 $time_array = explode( ' ', $microtime ); 474 return array_sum( $time_array ); 475 } 468 476 } -
branches/3.7/tests/phpunit/tests/post/getPages.php
r25976 r47492 80 80 // This should bump last_changed. 81 81 wp_delete_post( $pages[0]->ID ); 82 $this->assertGreaterThan( $last_changed, wp_cache_get( 'last_changed', 'posts' ) ); 82 $old_changed_float = $this->_microtime_to_float( $last_changed ); 83 $new_changed_float = $this->_microtime_to_float( wp_cache_get( 'last_changed', 'posts' ) ); 84 $this->assertGreaterThan( $old_changed_float, $new_changed_float ); 83 85 84 86 $num_queries = $wpdb->num_queries;
Note: See TracChangeset
for help on using the changeset viewer.