diff --git a/tests/phpunit/includes/testcase.php b/tests/phpunit/includes/testcase.php index 7cd7148296..5f77db201f 100644 --- a/tests/phpunit/includes/testcase.php +++ b/tests/phpunit/includes/testcase.php @@ -32,9 +32,11 @@ class WP_UnitTestCase extends PHPUnit_Framework_TestCase { } function tearDown() { - global $wpdb; + global $wpdb, $wp_query, $post; $this->expectedDeprecated(); $wpdb->query( 'ROLLBACK' ); + $wp_query = new WP_Query(); + $post = null; remove_filter( 'query', array( $this, '_create_temporary_tables' ) ); remove_filter( 'query', array( $this, '_drop_temporary_tables' ) ); remove_filter( 'wp_die_handler', array( $this, 'get_wp_die_handler' ) );