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
This commit is contained in:
Sergey Biryukov 2018-12-17 01:24:36 +00:00
parent d79ec242e4
commit e3e683fc09
1 changed files with 1 additions and 1 deletions

View File

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