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
This commit is contained in:
John Blackbourn
2021-02-27 17:08:26 +00:00
parent 3542c3b4c0
commit 055deeabff
29 changed files with 43 additions and 47 deletions

View File

@@ -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();