Changeset 38398 for trunk/tests/phpunit/includes/testcase.php
- Timestamp:
- 08/27/2016 08:35:16 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/testcase.php
r37861 r38398 62 62 $c = self::get_called_class(); 63 63 if ( ! method_exists( $c, 'wpSetUpBeforeClass' ) ) { 64 self::commit_transaction(); 64 65 return; 65 66 } … … 73 74 parent::tearDownAfterClass(); 74 75 76 _delete_all_data(); 77 self::flush_cache(); 78 75 79 $c = self::get_called_class(); 76 80 if ( ! method_exists( $c, 'wpTearDownAfterClass' ) ) { 81 self::commit_transaction(); 77 82 return; 78 83 } … … 159 164 $_GET = array(); 160 165 $_POST = array(); 161 $this->flush_cache();166 self::flush_cache(); 162 167 } 163 168 … … 244 249 } 245 250 246 function flush_cache() {251 static function flush_cache() { 247 252 global $wp_object_cache; 248 253 $wp_object_cache->group_ops = array(); … … 446 451 unset($_SERVER['PATH_INFO']); 447 452 448 $this->flush_cache();453 self::flush_cache(); 449 454 unset($GLOBALS['wp_query'], $GLOBALS['wp_the_query']); 450 455 $GLOBALS['wp_the_query'] = new WP_Query();
Note: See TracChangeset
for help on using the changeset viewer.