summaryrefslogtreecommitdiffstatshomepage
path: root/tests/phpunit/includes
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/includes')
-rw-r--r--tests/phpunit/includes/testcase-ajax.php2
-rw-r--r--tests/phpunit/includes/testcase-block-supports.php4
-rw-r--r--tests/phpunit/includes/testcase-rest-controller.php2
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/phpunit/includes/testcase-ajax.php b/tests/phpunit/includes/testcase-ajax.php
index 34fd32a392..c6db8305c6 100644
--- a/tests/phpunit/includes/testcase-ajax.php
+++ b/tests/phpunit/includes/testcase-ajax.php
@@ -157,7 +157,6 @@ abstract class WP_Ajax_UnitTestCase extends WP_UnitTestCase {
* Resets $_POST, removes the wp_die() override, restores error reporting.
*/
public function tearDown() {
- parent::tearDown();
$_POST = array();
$_GET = array();
unset( $GLOBALS['post'] );
@@ -166,6 +165,7 @@ abstract class WP_Ajax_UnitTestCase extends WP_UnitTestCase {
remove_action( 'clear_auth_cookie', array( $this, 'logout' ) );
error_reporting( $this->_error_level );
set_current_screen( 'front' );
+ parent::tearDown();
}
/**
diff --git a/tests/phpunit/includes/testcase-block-supports.php b/tests/phpunit/includes/testcase-block-supports.php
index f54dba8b9f..981bfcd190 100644
--- a/tests/phpunit/includes/testcase-block-supports.php
+++ b/tests/phpunit/includes/testcase-block-supports.php
@@ -19,12 +19,12 @@ class Block_Supported_Styles_Test extends WP_UnitTestCase {
* Tear down each test method.
*/
public function tearDown() {
- parent::tearDown();
-
while ( ! empty( $this->registered_block_names ) ) {
$block_name = array_pop( $this->registered_block_names );
unregister_block_type( $block_name );
}
+
+ parent::tearDown();
}
/**
diff --git a/tests/phpunit/includes/testcase-rest-controller.php b/tests/phpunit/includes/testcase-rest-controller.php
index bc7d409368..2c79df11be 100644
--- a/tests/phpunit/includes/testcase-rest-controller.php
+++ b/tests/phpunit/includes/testcase-rest-controller.php
@@ -14,11 +14,11 @@ abstract class WP_Test_REST_Controller_Testcase extends WP_Test_REST_TestCase {
}
public function tearDown() {
- parent::tearDown();
remove_filter( 'rest_url', array( $this, 'test_rest_url_for_leading_slash' ), 10, 2 );
/** @var WP_REST_Server $wp_rest_server */
global $wp_rest_server;
$wp_rest_server = null;
+ parent::tearDown();
}
abstract public function test_register_routes();