mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Tests: Replace use of $this->server with rest_get_server() for better memory recycling.
Props danielbachhuber. Fixes #41641. git-svn-id: https://develop.svn.wordpress.org/trunk@42724 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -9,8 +9,8 @@ abstract class WP_Test_REST_Controller_Testcase extends WP_Test_REST_TestCase {
|
||||
add_filter( 'rest_url', array( $this, 'filter_rest_url_for_leading_slash' ), 10, 2 );
|
||||
/** @var WP_REST_Server $wp_rest_server */
|
||||
global $wp_rest_server;
|
||||
$this->server = $wp_rest_server = new Spy_REST_Server;
|
||||
do_action( 'rest_api_init' );
|
||||
$wp_rest_server = new Spy_REST_Server;
|
||||
do_action( 'rest_api_init', $wp_rest_server );
|
||||
}
|
||||
|
||||
public function tearDown() {
|
||||
|
||||
Reference in New Issue
Block a user