From e3e683fc09d96505ba6099794bc48061905c161d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 17 Dec 2018 01:24:36 +0000 Subject: [PATCH] Tests: Replace use of `$this->server` with `rest_get_server()` in `test_registered_query_params()`. In [42724], `$this->server` was replaced with `rest_get_server()` for better memory recycling. [43897], from the 5.0 branch, was merged into trunk in [44250] and used the now unavailable `$this->server`. This updates the new test from the 5.0 branch to use the expected `rest_get_server()`. See #43316, #41641. git-svn-id: https://develop.svn.wordpress.org/trunk@44255 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/rest-api/rest-autosaves-controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/rest-api/rest-autosaves-controller.php b/tests/phpunit/tests/rest-api/rest-autosaves-controller.php index 10d2b23ef9..8d989f7df7 100644 --- a/tests/phpunit/tests/rest-api/rest-autosaves-controller.php +++ b/tests/phpunit/tests/rest-api/rest-autosaves-controller.php @@ -153,7 +153,7 @@ class WP_Test_REST_Autosaves_Controller extends WP_Test_REST_Post_Type_Controlle public function test_registered_query_params() { $request = new WP_REST_Request( 'OPTIONS', '/wp/v2/posts/' . self::$post_id . '/autosaves' ); - $response = $this->server->dispatch( $request ); + $response = rest_get_server()->dispatch( $request ); $data = $response->get_data(); $keys = array_keys( $data['endpoints'][0]['args'] ); sort( $keys );