summaryrefslogtreecommitdiffstatshomepage
path: root/tests/phpunit/includes/testcase-rest-controller.php
diff options
context:
space:
mode:
authorJohn Blackbourn <johnbillion@git.wordpress.org>2021-02-27 17:08:26 +0000
committerJohn Blackbourn <johnbillion@git.wordpress.org>2021-02-27 17:08:26 +0000
commit055deeabff74e1a327fd7142f719622f7b6ff81e (patch)
tree864bf0fec2f21236e9d02e6582f0eef9c388c15c /tests/phpunit/includes/testcase-rest-controller.php
parent3542c3b4c0f40c6df81a6f475491b017f5f92263 (diff)
downloadwordpress-055deeabff74e1a327fd7142f719622f7b6ff81e.tar.gz
wordpress-055deeabff74e1a327fd7142f719622f7b6ff81e.zip
Build/Test Tools: Fix and standardise calls to the `tearDown()` method in the test suite.
The parent method should be called after any test-specific teardown. See #52625 git-svn-id: https://develop.svn.wordpress.org/trunk@50450 602fd350-edb4-49c9-b593-d223f7449a82
Diffstat (limited to 'tests/phpunit/includes/testcase-rest-controller.php')
-rw-r--r--tests/phpunit/includes/testcase-rest-controller.php2
1 files changed, 1 insertions, 1 deletions
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();