Make WordPress Core

Changeset 44255


Ignore:
Timestamp:
12/17/2018 01:24:36 AM (6 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-autosaves-controller.php

    r44253 r44255  
    154154    public function test_registered_query_params() {
    155155        $request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/posts/' . self::$post_id . '/autosaves' );
    156         $response = $this->server->dispatch( $request );
     156        $response = rest_get_server()->dispatch( $request );
    157157        $data     = $response->get_data();
    158158        $keys     = array_keys( $data['endpoints'][0]['args'] );
Note: See TracChangeset for help on using the changeset viewer.