Changeset 38678 for trunk/tests/phpunit/includes/testcase.php
- Timestamp:
- 09/30/2016 03:15:36 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/testcase.php
r38571 r38678 143 143 */ 144 144 function tearDown() { 145 global $wpdb, $wp_query, $wp , $post;145 global $wpdb, $wp_query, $wp; 146 146 $wpdb->query( 'ROLLBACK' ); 147 147 if ( is_multisite() ) { … … 152 152 $wp_query = new WP_Query(); 153 153 $wp = new WP(); 154 $post = null; 154 155 // Reset globals related to the post loop and `setup_postdata()`. 156 $post_globals = array( 'post', 'id', 'authordata', 'currentday', 'currentmonth', 'page', 'pages', 'multipage', 'more', 'numpages' ); 157 foreach ( $post_globals as $global ) { 158 $GLOBALS[ $global ] = null; 159 } 160 155 161 remove_theme_support( 'html5' ); 156 162 remove_filter( 'query', array( $this, '_create_temporary_tables' ) );
Note: See TracChangeset
for help on using the changeset viewer.