Index: /trunk/tests/phpunit/includes/bootstrap.php
===================================================================
--- /trunk/tests/phpunit/includes/bootstrap.php	(revision 42723)
+++ /trunk/tests/phpunit/includes/bootstrap.php	(revision 42724)
@@ -86,4 +86,6 @@
 // Allow tests to override wp_die
 tests_add_filter( 'wp_die_handler', '_wp_die_handler_filter' );
+// Use the Spy REST Server instead of default
+tests_add_filter( 'wp_rest_server_class', '_wp_rest_server_class_filter' );
 
 // Preset WordPress options defined in bootstrap file.
Index: /trunk/tests/phpunit/includes/functions.php
===================================================================
--- /trunk/tests/phpunit/includes/functions.php	(revision 42723)
+++ /trunk/tests/phpunit/includes/functions.php	(revision 42724)
@@ -181,4 +181,11 @@
 }
 
+/**
+ * Use the Spy_REST_Server class for the REST server.
+ */
+function _wp_rest_server_class_filter() {
+	return 'Spy_REST_Server';
+}
+
 // Skip `setcookie` calls in auth_cookie functions due to warning:
 // Cannot modify header information - headers already sent by ...
Index: /trunk/tests/phpunit/includes/testcase-rest-controller.php
===================================================================
--- /trunk/tests/phpunit/includes/testcase-rest-controller.php	(revision 42723)
+++ /trunk/tests/phpunit/includes/testcase-rest-controller.php	(revision 42724)
@@ -10,6 +10,6 @@
 		/** @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 );
 	}
 
Index: /trunk/tests/phpunit/tests/oembed/controller.php
===================================================================
--- /trunk/tests/phpunit/tests/oembed/controller.php	(revision 42723)
+++ /trunk/tests/phpunit/tests/oembed/controller.php	(revision 42724)
@@ -46,7 +46,7 @@
 		/** @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', $this->server );
+		$wp_rest_server = new Spy_REST_Server;
+		do_action( 'rest_api_init', $wp_rest_server );
+
 		add_filter( 'pre_http_request', array( $this, 'mock_embed_request' ), 10, 3 );
 		$this->request_count = 0;
@@ -55,4 +55,7 @@
 	public function tearDown() {
 		parent::tearDown();
+		/** @var WP_REST_Server $wp_rest_server */
+		global $wp_rest_server;
+		$wp_rest_server = null;
 
 		remove_filter( 'pre_http_request', array( $this, 'mock_embed_request' ), 10 );
@@ -180,5 +183,5 @@
 	public function test_route_availability() {
 		// Check the route was registered correctly.
-		$filtered_routes = $this->server->get_routes();
+		$filtered_routes = rest_get_server()->get_routes();
 		$this->assertArrayHasKey( '/oembed/1.0/embed', $filtered_routes );
 		$route = $filtered_routes['/oembed/1.0/embed'];
@@ -201,5 +204,5 @@
 		$request = new WP_REST_Request( 'POST', '/oembed/1.0/embed' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -210,5 +213,5 @@
 		$request = new WP_REST_Request( 'GET', '/oembed/1.0/embed' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -221,5 +224,5 @@
 		$request->set_param( 'url', 'http://google.com/' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -234,5 +237,5 @@
 		$request->set_param( 'format', 'random' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -258,5 +261,5 @@
 		$request->set_param( 'maxwidth', 400 );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -301,5 +304,5 @@
 		$request->set_param( 'maxwidth', 400 );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -346,5 +349,5 @@
 		$request->set_param( 'maxwidth', 400 );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -389,5 +392,5 @@
 		$request->set_param( 'maxwidth', 400 );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -415,6 +418,6 @@
 		$request->set_param( 'format', 'xml' );
 
-		$response = $this->server->dispatch( $request );
-		$output   = get_echo( '_oembed_rest_pre_serve_request', array( true, $response, $request, $this->server ) );
+		$response = rest_get_server()->dispatch( $request );
+		$output   = get_echo( '_oembed_rest_pre_serve_request', array( true, $response, $request, rest_get_server() ) );
 
 		$xml = simplexml_load_string( $output );
@@ -429,7 +432,7 @@
 		$request->set_param( 'format', 'json' );
 
-		$response = $this->server->dispatch( $request );
-
-		$this->assertTrue( _oembed_rest_pre_serve_request( true, $response, $request, $this->server ) );
+		$response = rest_get_server()->dispatch( $request );
+
+		$this->assertTrue( _oembed_rest_pre_serve_request( true, $response, $request, rest_get_server() ) );
 	}
 
@@ -441,7 +444,7 @@
 		$request->set_param( 'format', 'xml' );
 
-		$response = $this->server->dispatch( $request );
-
-		$this->assertTrue( _oembed_rest_pre_serve_request( true, $response, $request, $this->server ) );
+		$response = rest_get_server()->dispatch( $request );
+
+		$this->assertTrue( _oembed_rest_pre_serve_request( true, $response, $request, rest_get_server() ) );
 	}
 
@@ -478,5 +481,5 @@
 		// Test without a login.
 		$request  = new WP_REST_Request( 'GET', '/oembed/1.0/proxy' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 400, $response->get_status() );
@@ -486,5 +489,5 @@
 		$request = new WP_REST_Request( 'GET', '/oembed/1.0/proxy' );
 		$request->set_param( 'url', self::INVALID_OEMBED_URL );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 403, $response->get_status() );
@@ -497,5 +500,5 @@
 		$request = new WP_REST_Request( 'GET', '/oembed/1.0/proxy' );
 		$request->set_param( 'url', self::INVALID_OEMBED_URL );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 404, $response->get_status() );
 		$data = $response->get_data();
@@ -507,5 +510,5 @@
 		$request = new WP_REST_Request( 'GET', '/oembed/1.0/proxy' );
 		$request->set_param( 'type', 'xml' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 400, $response->get_status() );
@@ -519,10 +522,10 @@
 		$request->set_param( 'maxheight', 789 );
 		$request->set_param( '_wpnonce', wp_create_nonce( 'wp_rest' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$this->assertEquals( 1, $this->request_count );
 
 		// Subsequent request is cached and so it should not cause a request.
-		$this->server->dispatch( $request );
+		rest_get_server()->dispatch( $request );
 		$this->assertEquals( 1, $this->request_count );
 
@@ -534,5 +537,5 @@
 		$request->set_param( 'maxwidth', 456 );
 		$request->set_param( 'maxheight', 789 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 1, $this->request_count );
 
@@ -555,5 +558,5 @@
 		$request->set_param( 'url', self::INVALID_OEMBED_URL );
 		$request->set_param( 'discover', 0 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 404, $response->get_status() );
 		$this->assertEquals( 0, $this->request_count );
@@ -566,5 +569,5 @@
 		$request = new WP_REST_Request( 'GET', '/oembed/1.0/proxy' );
 		$request->set_param( 'url', self::INVALID_OEMBED_URL );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 404, $response->get_status() );
 		$this->assertEquals( 1, $this->request_count );
@@ -577,5 +580,5 @@
 		$request->set_param( 'discover', 'notaboolean' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 400, $response->get_status() );
Index: /trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php
===================================================================
--- /trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php	(revision 42723)
+++ /trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php	(revision 42724)
@@ -77,5 +77,5 @@
 
 	public function test_register_routes() {
-		$routes = $this->server->get_routes();
+		$routes = rest_get_server()->get_routes();
 		$this->assertArrayHasKey( '/wp/v2/media', $routes );
 		$this->assertCount( 2, $routes['/wp/v2/media'] );
@@ -128,5 +128,5 @@
 		// Collection
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/media' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -140,5 +140,5 @@
 		);
 		$request       = new WP_REST_Request( 'OPTIONS', '/wp/v2/media/' . $attachment_id );
-		$response      = $this->server->dispatch( $request );
+		$response      = rest_get_server()->dispatch( $request );
 		$data          = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -148,5 +148,5 @@
 	public function test_registered_query_params() {
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/media' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$keys     = array_keys( $data['endpoints'][0]['args'] );
@@ -195,5 +195,5 @@
 		);
 		$request  = new WP_REST_Request( 'OPTIONS', sprintf( '/wp/v2/media/%d', $id1 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$keys     = array_keys( $data['endpoints'][0]['args'] );
@@ -225,5 +225,5 @@
 		);
 		$request        = new WP_REST_Request( 'GET', '/wp/v2/media' );
-		$response       = $this->server->dispatch( $request );
+		$response       = rest_get_server()->dispatch( $request );
 		$data           = $response->get_data();
 		$this->assertCount( 2, $data );
@@ -259,5 +259,5 @@
 		);
 		$request        = new WP_REST_Request( 'GET', '/wp/v2/media' );
-		$response       = $this->server->dispatch( $request );
+		$response       = rest_get_server()->dispatch( $request );
 
 		$data = $response->get_data();
@@ -276,14 +276,14 @@
 		);
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/media' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( $id1, $data[0]['id'] );
 		// media_type=video
 		$request->set_param( 'media_type', 'video' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 0, $response->get_data() );
 		// media_type=image
 		$request->set_param( 'media_type', 'image' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( $id1, $data[0]['id'] );
@@ -297,14 +297,14 @@
 		);
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/media' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( $id1, $data[0]['id'] );
 		// mime_type=image/png
 		$request->set_param( 'mime_type', 'image/png' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 0, $response->get_data() );
 		// mime_type=image/jpeg
 		$request->set_param( 'mime_type', 'image/jpeg' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( $id1, $data[0]['id'] );
@@ -327,10 +327,10 @@
 		// all attachments
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/media' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 2, count( $response->get_data() ) );
 		$request = new WP_REST_Request( 'GET', '/wp/v2/media' );
 		// attachments without a parent
 		$request->set_param( 'parent', 0 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 1, count( $data ) );
@@ -339,5 +339,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/media' );
 		$request->set_param( 'parent', $post_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 1, count( $data ) );
@@ -346,5 +346,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/media' );
 		$request->set_param( 'parent', REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 0, count( $data ) );
@@ -362,5 +362,5 @@
 		$request->set_param( 'status', 'publish' );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertCount( 3, $data );
@@ -380,9 +380,9 @@
 		$request        = new WP_REST_Request( 'GET', '/wp/v2/media' );
 		$request->set_param( 'status', 'private' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 		// Properly authorized users can make the request
 		wp_set_current_user( self::$editor_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -409,9 +409,9 @@
 		$request        = new WP_REST_Request( 'GET', '/wp/v2/media' );
 		$request->set_param( 'status', array( 'private', 'trash' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 		// Properly authorized users can make the request
 		wp_set_current_user( self::$editor_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -429,5 +429,5 @@
 		$request->set_param( 'after', rand_str() );
 		$request->set_param( 'before', rand_str() );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -458,5 +458,5 @@
 		$request->set_param( 'after', '2016-01-15T00:00:00Z' );
 		$request->set_param( 'before', '2016-01-17T00:00:00Z' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertCount( 1, $data );
@@ -473,5 +473,5 @@
 		update_post_meta( $attachment_id, '_wp_attachment_image_alt', 'Sample alt text' );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/media/' . $attachment_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_get_post_response( $response );
 		$data = $response->get_data();
@@ -491,5 +491,5 @@
 
 		$request            = new WP_REST_Request( 'GET', '/wp/v2/media/' . $attachment_id );
-		$response           = $this->server->dispatch( $request );
+		$response           = rest_get_server()->dispatch( $request );
 		$data               = $response->get_data();
 		$image_src          = wp_get_attachment_image_src( $attachment_id, 'rest-api-test' );
@@ -517,5 +517,5 @@
 
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/media/' . $attachment_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		remove_filter( 'wp_get_attachment_image_src', '__return_false' );
@@ -535,5 +535,5 @@
 		);
 		$request    = new WP_REST_Request( 'GET', '/wp/v2/media/' . $id1 );
-		$response   = $this->server->dispatch( $request );
+		$response   = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 401, $response->get_status() );
 	}
@@ -547,5 +547,5 @@
 		);
 		$request       = new WP_REST_Request( 'GET', sprintf( '/wp/v2/media/%d', $attachment_id ) );
-		$response      = $this->server->dispatch( $request );
+		$response      = rest_get_server()->dispatch( $request );
 		$data          = $response->get_data();
 
@@ -563,5 +563,5 @@
 		);
 		$request       = new WP_REST_Request( 'GET', sprintf( '/wp/v2/media/%d', $attachment_id ) );
-		$response      = $this->server->dispatch( $request );
+		$response      = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_forbidden', $response, 401 );
@@ -580,5 +580,5 @@
 
 		$request->set_body( file_get_contents( $this->test_file ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -611,5 +611,5 @@
 		);
 		$request->set_header( 'Content-MD5', md5_file( $this->test_file2 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 201, $response->get_status() );
 		$data = $response->get_data();
@@ -631,5 +631,5 @@
 		);
 		$request->set_header( 'Content-MD5', md5_file( $this->test_file ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 201, $response->get_status() );
 	}
@@ -649,5 +649,5 @@
 		);
 		$request->set_header( 'Content-MD5', md5_file( $this->test_file ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 201, $response->get_status() );
 	}
@@ -656,5 +656,5 @@
 		wp_set_current_user( self::$author_id );
 		$request  = new WP_REST_Request( 'POST', '/wp/v2/media' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_upload_no_data', $response, 400 );
 	}
@@ -664,5 +664,5 @@
 		$request = new WP_REST_Request( 'POST', '/wp/v2/media' );
 		$request->set_body( file_get_contents( $this->test_file ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_upload_no_content_type', $response, 400 );
 	}
@@ -673,5 +673,5 @@
 		$request->set_header( 'Content-Type', 'image/jpeg' );
 		$request->set_body( file_get_contents( $this->test_file ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_upload_no_content_disposition', $response, 400 );
 	}
@@ -684,5 +684,5 @@
 		$request->set_header( 'Content-MD5', 'abc123' );
 		$request->set_body( file_get_contents( $this->test_file ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_upload_hash_mismatch', $response, 412 );
 	}
@@ -702,5 +702,5 @@
 		);
 		$request->set_header( 'Content-MD5', 'abc123' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_upload_hash_mismatch', $response, 412 );
 	}
@@ -709,5 +709,5 @@
 		wp_set_current_user( self::$contributor_id );
 		$request  = new WP_REST_Request( 'POST', '/wp/v2/media' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_create', $response, 403 );
 	}
@@ -718,5 +718,5 @@
 		$request = new WP_REST_Request( 'POST', '/wp/v2/media' );
 		$request->set_param( 'post', $post_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_edit', $response, 403 );
 	}
@@ -727,5 +727,5 @@
 		$request = new WP_REST_Request( 'POST', '/wp/v2/media' );
 		$request->set_param( 'post', $post_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_edit', $response, 403 );
 	}
@@ -745,5 +745,5 @@
 		$request->set_body( file_get_contents( $this->test_file ) );
 		$request->set_param( 'post', $attachment_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -757,5 +757,5 @@
 		$request->set_body( file_get_contents( $this->test_file ) );
 		$request->set_param( 'alt_text', 'test alt text' );
-		$response   = $this->server->dispatch( $request );
+		$response   = rest_get_server()->dispatch( $request );
 		$attachment = $response->get_data();
 		$this->assertEquals( 'test alt text', $attachment['alt_text'] );
@@ -769,5 +769,5 @@
 		$request->set_body( file_get_contents( $this->test_file ) );
 		$request->set_param( 'alt_text', '<script>alert(document.cookie)</script>' );
-		$response   = $this->server->dispatch( $request );
+		$response   = rest_get_server()->dispatch( $request );
 		$attachment = $response->get_data();
 		$this->assertEquals( '', $attachment['alt_text'] );
@@ -788,5 +788,5 @@
 		$request->set_param( 'description', 'Without a description, my attachment is descriptionless.' );
 		$request->set_param( 'alt_text', 'Alt text is stored outside post schema.' );
-		$response   = $this->server->dispatch( $request );
+		$response   = rest_get_server()->dispatch( $request );
 		$data       = $response->get_data();
 		$attachment = get_post( $data['id'] );
@@ -818,5 +818,5 @@
 		$request    = new WP_REST_Request( 'POST', '/wp/v2/media/' . $attachment_id );
 		$request->set_param( 'post', $new_parent );
-		$this->server->dispatch( $request );
+		rest_get_server()->dispatch( $request );
 
 		$attachment = get_post( $attachment_id );
@@ -835,5 +835,5 @@
 		$request       = new WP_REST_Request( 'POST', '/wp/v2/media/' . $attachment_id );
 		$request->set_param( 'caption', 'This is a better caption.' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_edit', $response, 403 );
 	}
@@ -857,5 +857,5 @@
 		$request       = new WP_REST_Request( 'POST', '/wp/v2/media/' . $attachment_id );
 		$request->set_param( 'post', $attachment_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -871,5 +871,5 @@
 			$request->set_param( $name, $value );
 		}
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 201, $response->get_status() );
 		$actual_output = $response->get_data();
@@ -903,5 +903,5 @@
 			$request->set_param( $name, $value );
 		}
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$actual_output = $response->get_data();
@@ -1121,5 +1121,5 @@
 		$request          = new WP_REST_Request( 'DELETE', '/wp/v2/media/' . $attachment_id );
 		$request['force'] = true;
-		$response         = $this->server->dispatch( $request );
+		$response         = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 	}
@@ -1136,9 +1136,9 @@
 		// Attempt trashing
 		$request  = new WP_REST_Request( 'DELETE', '/wp/v2/media/' . $attachment_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_trash_not_supported', $response, 501 );
 
 		$request->set_param( 'force', 'false' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_trash_not_supported', $response, 501 );
 
@@ -1158,5 +1158,5 @@
 		);
 		$request       = new WP_REST_Request( 'DELETE', '/wp/v2/media/' . $attachment_id );
-		$response      = $this->server->dispatch( $request );
+		$response      = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_delete', $response, 403 );
 	}
@@ -1173,5 +1173,5 @@
 		$attachment = get_post( $attachment_id );
 		$request    = new WP_REST_Request( 'GET', sprintf( '/wp/v2/media/%d', $attachment_id ) );
-		$response   = $this->server->dispatch( $request );
+		$response   = rest_get_server()->dispatch( $request );
 		$data       = $response->get_data();
 		$this->check_post_data( $attachment, $data, 'view', $response->get_links() );
@@ -1181,5 +1181,5 @@
 	public function test_get_item_schema() {
 		$request    = new WP_REST_Request( 'OPTIONS', '/wp/v2/media' );
-		$response   = $this->server->dispatch( $request );
+		$response   = rest_get_server()->dispatch( $request );
 		$data       = $response->get_data();
 		$properties = $data['schema']['properties'];
@@ -1235,5 +1235,5 @@
 		$request = new WP_REST_Request( 'OPTIONS', '/wp/v2/media' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertArrayHasKey( 'my_custom_int', $data['schema']['properties'] );
@@ -1249,5 +1249,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/media/' . $attachment_id );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertArrayHasKey( 'my_custom_int', $response->data );
 
@@ -1288,5 +1288,5 @@
 		);
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
@@ -1312,5 +1312,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/media' );
 		$request->set_param( 'search', $filename );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
Index: /trunk/tests/phpunit/tests/rest-api/rest-categories-controller.php
===================================================================
--- /trunk/tests/phpunit/tests/rest-api/rest-categories-controller.php	(revision 42723)
+++ /trunk/tests/phpunit/tests/rest-api/rest-categories-controller.php	(revision 42724)
@@ -34,5 +34,5 @@
 
 	public function test_register_routes() {
-		$routes = $this->server->get_routes();
+		$routes = rest_get_server()->get_routes();
 		$this->assertArrayHasKey( '/wp/v2/categories', $routes );
 		$this->assertArrayHasKey( '/wp/v2/categories/(?P<id>[\d]+)', $routes );
@@ -42,5 +42,5 @@
 		// Collection
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/categories' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -49,5 +49,5 @@
 		$category1 = $this->factory->category->create( array( 'name' => 'Season 5' ) );
 		$request   = new WP_REST_Request( 'OPTIONS', '/wp/v2/categories/' . $category1 );
-		$response  = $this->server->dispatch( $request );
+		$response  = rest_get_server()->dispatch( $request );
 		$data      = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -57,5 +57,5 @@
 	public function test_registered_query_params() {
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/categories' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$keys     = array_keys( $data['endpoints'][0]['args'] );
@@ -81,5 +81,5 @@
 	public function test_get_items() {
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/categories' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_get_taxonomy_terms_response( $response );
 	}
@@ -89,5 +89,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/categories' );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_forbidden_context', $response, 401 );
 	}
@@ -100,5 +100,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/categories' );
 		$request->set_param( 'hide_empty', true );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 2, count( $data ) );
@@ -108,5 +108,5 @@
 		// Confirm the empty category "Uncategorized" category appears.
 		$request->set_param( 'hide_empty', 'false' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 3, count( $data ) );
@@ -130,5 +130,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/categories' );
 		$request->set_param( 'parent', 0 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 200, $response->get_status() );
@@ -160,5 +160,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/categories' );
 		$request->set_param( 'parent', '0' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 200, $response->get_status() );
@@ -178,5 +178,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/categories' );
 		$request->set_param( 'parent', $parent1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 200, $response->get_status() );
@@ -189,5 +189,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/categories' );
 		$request->set_param( 'page', 0 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 		$data        = $response->get_data();
@@ -203,5 +203,5 @@
 		// Orderby=>asc
 		$request->set_param( 'include', array( $id3, $id1 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 2, count( $data ) );
@@ -209,5 +209,5 @@
 		// Orderby=>include
 		$request->set_param( 'orderby', 'include' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 2, count( $data ) );
@@ -219,10 +219,10 @@
 		$id2      = $this->factory->category->create();
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/categories' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertTrue( in_array( $id1, wp_list_pluck( $data, 'id' ), true ) );
 		$this->assertTrue( in_array( $id2, wp_list_pluck( $data, 'id' ), true ) );
 		$request->set_param( 'exclude', array( $id2 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertTrue( in_array( $id1, wp_list_pluck( $data, 'id' ), true ) );
@@ -243,5 +243,5 @@
 		$request->set_param( 'order', 'desc' );
 		$request->set_param( 'per_page', 1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -252,5 +252,5 @@
 		$request->set_param( 'order', 'asc' );
 		$request->set_param( 'per_page', 2 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -265,5 +265,5 @@
 		// defaults to orderby=name, order=asc
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/categories' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -275,5 +275,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/categories' );
 		$request->set_param( 'orderby', 'id' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -286,5 +286,5 @@
 		$request->set_param( 'orderby', 'id' );
 		$request->set_param( 'order', 'desc' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 200, $response->get_status() );
@@ -302,5 +302,5 @@
 		$request->set_param( 'orderby', 'include_slugs' );
 		$request->set_param( 'slug', array( 'taco', 'burrito', 'chalupa' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 200, $response->get_status() );
@@ -340,5 +340,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/categories' );
 		$request->set_param( 'post', $post_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -358,5 +358,5 @@
 		$request->set_param( 'post', $post_id );
 		$request->set_param( 'orderby', 'description' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -368,5 +368,5 @@
 		// Flip the order
 		$request->set_param( 'order', 'desc' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -383,5 +383,5 @@
 		$request->set_param( 'post', $post_id );
 		$request->set_param( 'orderby', 'id' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -419,5 +419,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/batman' );
 		$request->set_param( 'post', $post_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -436,5 +436,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/categories' );
 		$request->set_param( 'search', 'App' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -443,5 +443,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/categories' );
 		$request->set_param( 'search', 'Garbage' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -454,5 +454,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/categories' );
 		$request->set_param( 'slug', 'apple' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -471,5 +471,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/categories' );
 		$request->set_param( 'parent', $category1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 1, count( $data ) );
@@ -487,5 +487,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/categories' );
 		$request->set_param( 'parent', 'invalid-parent' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -507,5 +507,5 @@
 
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/terms/robin' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_no_route', $response, 404 );
 	}
@@ -513,5 +513,5 @@
 	public function test_get_terms_invalid_taxonomy() {
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/invalid-taxonomy' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_no_route', $response, 404 );
 	}
@@ -527,5 +527,5 @@
 		}
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/categories' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 50, $headers['X-WP-Total'] );
@@ -547,5 +547,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/categories' );
 		$request->set_param( 'page', 3 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 51, $headers['X-WP-Total'] );
@@ -567,5 +567,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/categories' );
 		$request->set_param( 'page', 6 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 51, $headers['X-WP-Total'] );
@@ -582,5 +582,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/categories' );
 		$request->set_param( 'page', 8 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 51, $headers['X-WP-Total'] );
@@ -608,5 +608,5 @@
 		$request->set_param( 'page', 1 );
 		$request->set_param( 'per_page', 100 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 18, $headers['X-WP-Total'] );
@@ -616,5 +616,5 @@
 		$request->set_param( 'page', 2 );
 		$request->set_param( 'per_page', 100 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 18, $headers['X-WP-Total'] );
@@ -625,5 +625,5 @@
 	public function test_get_item() {
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/categories/1' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_get_taxonomy_term_response( $response );
 	}
@@ -631,5 +631,5 @@
 	public function test_get_term_invalid_taxonomy() {
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/invalid-taxonomy/1' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_no_route', $response, 404 );
 	}
@@ -637,5 +637,5 @@
 	public function test_get_term_invalid_term() {
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/categories/' . REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_term_invalid', $response, 404 );
 	}
@@ -645,5 +645,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/categories/1' );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_forbidden_context', $response, 401 );
 	}
@@ -659,5 +659,5 @@
 
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/terms/robin/' . $term1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_no_route', $response, 404 );
 	}
@@ -672,5 +672,5 @@
 		);
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/categories/' . $term1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_term_invalid', $response, 404 );
 	}
@@ -682,5 +682,5 @@
 		$request->set_param( 'description', 'This term is so awesome.' );
 		$request->set_param( 'slug', 'so-awesome' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 201, $response->get_status() );
 		$headers = $response->get_headers();
@@ -702,5 +702,5 @@
 		$request->set_param( 'name', 'Existing' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 400, $response->get_status() );
 		$data = $response->get_data();
@@ -715,5 +715,5 @@
 		$request = new WP_REST_Request( 'POST', '/wp/v2/invalid-taxonomy' );
 		$request->set_param( 'name', 'Invalid Taxonomy' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_no_route', $response, 404 );
 	}
@@ -723,5 +723,5 @@
 		$request = new WP_REST_Request( 'POST', '/wp/v2/categories' );
 		$request->set_param( 'name', 'Incorrect permissions' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_create', $response, 403 );
 	}
@@ -730,5 +730,5 @@
 		wp_set_current_user( self::$administrator );
 		$request  = new WP_REST_Request( 'POST', '/wp/v2/categories' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_missing_callback_param', $response, 400 );
 	}
@@ -740,5 +740,5 @@
 		$request->set_param( 'name', 'My Awesome Term' );
 		$request->set_param( 'parent', $parent['term_id'] );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 201, $response->get_status() );
 		$data = $response->get_data();
@@ -753,5 +753,5 @@
 		$request->set_param( 'name', 'My Awesome Term' );
 		$request->set_param( 'parent', REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_term_invalid', $response, 400 );
 	}
@@ -769,5 +769,5 @@
 		$request->set_param( 'description', 'New Description' );
 		$request->set_param( 'slug', 'new-slug' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -781,5 +781,5 @@
 		$request = new WP_REST_Request( 'POST', '/wp/v2/invalid-taxonomy/' . REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
 		$request->set_param( 'name', 'Invalid Taxonomy' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_no_route', $response, 404 );
 	}
@@ -789,5 +789,5 @@
 		$request = new WP_REST_Request( 'POST', '/wp/v2/categories/' . REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
 		$request->set_param( 'name', 'Invalid Term' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_term_invalid', $response, 404 );
 	}
@@ -798,5 +798,5 @@
 		$request = new WP_REST_Request( 'POST', '/wp/v2/categories/' . $term->term_id );
 		$request->set_param( 'name', 'Incorrect permissions' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_update', $response, 403 );
 	}
@@ -809,5 +809,5 @@
 		$request = new WP_REST_Request( 'POST', '/wp/v2/categories/' . $term->term_id );
 		$request->set_param( 'parent', $parent->term_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -822,5 +822,5 @@
 		$request = new WP_REST_Request( 'POST', '/wp/v2/categories/' . $term->term_id );
 		$request->set_param( 'parent', REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_term_invalid', $response, 400 );
 	}
@@ -831,5 +831,5 @@
 		$request = new WP_REST_Request( 'DELETE', '/wp/v2/categories/' . $term->term_id );
 		$request->set_param( 'force', true );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -843,9 +843,9 @@
 
 		$request  = new WP_REST_Request( 'DELETE', '/wp/v2/categories/' . $term->term_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_trash_not_supported', $response, 501 );
 
 		$request->set_param( 'force', 'false' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_trash_not_supported', $response, 501 );
 	}
@@ -854,5 +854,5 @@
 		wp_set_current_user( self::$administrator );
 		$request  = new WP_REST_Request( 'DELETE', '/wp/v2/invalid-taxonomy/' . REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_no_route', $response, 404 );
 	}
@@ -861,5 +861,5 @@
 		wp_set_current_user( self::$administrator );
 		$request  = new WP_REST_Request( 'DELETE', '/wp/v2/categories/' . REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_term_invalid', $response, 404 );
 	}
@@ -869,5 +869,5 @@
 		$term     = get_term_by( 'id', $this->factory->category->create(), 'category' );
 		$request  = new WP_REST_Request( 'DELETE', '/wp/v2/categories/' . $term->term_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_delete', $response, 403 );
 	}
@@ -877,5 +877,5 @@
 
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/categories/1' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -892,5 +892,5 @@
 
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/categories/' . $child );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -905,5 +905,5 @@
 	public function test_get_item_schema() {
 		$request    = new WP_REST_Request( 'OPTIONS', '/wp/v2/categories' );
-		$response   = $this->server->dispatch( $request );
+		$response   = rest_get_server()->dispatch( $request );
 		$data       = $response->get_data();
 		$properties = $data['schema']['properties'];
@@ -939,5 +939,5 @@
 		$request = new WP_REST_Request( 'OPTIONS', '/wp/v2/categories' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertArrayHasKey( 'my_custom_int', $data['schema']['properties'] );
@@ -947,5 +947,5 @@
 		$request     = new WP_REST_Request( 'GET', '/wp/v2/categories/' . $category_id );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertArrayHasKey( 'my_custom_int', $response->data );
 
Index: /trunk/tests/phpunit/tests/rest-api/rest-comments-controller.php
===================================================================
--- /trunk/tests/phpunit/tests/rest-api/rest-comments-controller.php	(revision 42723)
+++ /trunk/tests/phpunit/tests/rest-api/rest-comments-controller.php	(revision 42724)
@@ -123,5 +123,5 @@
 
 	public function test_register_routes() {
-		$routes = $this->server->get_routes();
+		$routes = rest_get_server()->get_routes();
 
 		$this->assertArrayHasKey( '/wp/v2/comments', $routes );
@@ -134,5 +134,5 @@
 		// Collection
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/comments' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -140,5 +140,5 @@
 		// Single
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/comments/' . self::$approved_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -148,5 +148,5 @@
 	public function test_registered_query_params() {
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/comments' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$keys     = array_keys( $data['endpoints'][0]['args'] );
@@ -183,5 +183,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -207,5 +207,5 @@
 		$request->set_param( 'post', self::$password_id );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -228,5 +228,5 @@
 		$request->set_param( 'password', 'toomanysecrets' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -250,5 +250,5 @@
 		$request->set_param( 'post', array( self::$password_id, self::$post_id ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_read_post', $response, 401 );
 	}
@@ -265,5 +265,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -283,5 +283,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -301,5 +301,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -319,5 +319,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -338,5 +338,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -359,5 +359,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -372,5 +372,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_forbidden_context', $response, 401 );
 	}
@@ -381,5 +381,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 		$request->set_param( 'post', 0 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$comments = $response->get_data();
@@ -391,5 +391,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 		$request->set_param( 'post', 0 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_read', $response, 401 );
 	}
@@ -399,5 +399,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 	}
@@ -414,5 +414,5 @@
 		);
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -434,5 +434,5 @@
 		$request->set_param( 'order', 'asc' );
 		$request->set_param( 'include', array( $id3, $id1 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 2, count( $data ) );
@@ -440,5 +440,5 @@
 		// Orderby=>include
 		$request->set_param( 'orderby', 'include' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 2, count( $data ) );
@@ -446,10 +446,10 @@
 		// Orderby=>invalid should fail.
 		$request->set_param( 'orderby', 'invalid' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 		// fails on invalid id.
 		$request->set_param( 'orderby', array( 'include' ) );
 		$request->set_param( 'include', array( 'invalid' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -464,10 +464,10 @@
 		$id2      = $this->factory->comment->create( $args );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/comments' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertTrue( in_array( $id1, wp_list_pluck( $data, 'id' ), true ) );
 		$this->assertTrue( in_array( $id2, wp_list_pluck( $data, 'id' ), true ) );
 		$request->set_param( 'exclude', array( $id2 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertTrue( in_array( $id1, wp_list_pluck( $data, 'id' ), true ) );
@@ -476,5 +476,5 @@
 		// fails on invalid id.
 		$request->set_param( 'exclude', array( 'invalid' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -491,17 +491,17 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 		$request->set_param( 'offset', 1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 3, $response->get_data() );
 		// 'offset' works with 'per_page'
 		$request->set_param( 'per_page', 2 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 2, $response->get_data() );
 		// 'offset' takes priority over 'page'
 		$request->set_param( 'page', 3 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 2, $response->get_data() );
 		// 'offset' with invalid value errors.
 		$request->set_param( 'offset', 'moreplease' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -518,15 +518,15 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 		// order defaults to 'desc'
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( $id3, $data[0]['id'] );
 		// order=>asc
 		$request->set_param( 'order', 'asc' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( self::$approved_id, $data[0]['id'] );
 		// order=>asc,id should fail
 		$request->set_param( 'order', 'asc,id' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -537,5 +537,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 		$request->set_param( 'post', $post_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_read_post', $response, 401 );
 	}
@@ -558,5 +558,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 		$request->set_param( 'author', self::$author_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$comments = $response->get_data();
@@ -564,5 +564,5 @@
 		// Multiple authors are supported
 		$request->set_param( 'author', array( self::$author_id, self::$subscriber_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$comments = $response->get_data();
@@ -570,10 +570,10 @@
 		// Invalid author param errors
 		$request->set_param( 'author', 'skippy' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 		// Unavailable to unauthenticated; defaults to error
 		wp_set_current_user( 0 );
 		$request->set_param( 'author', array( self::$author_id, self::$subscriber_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_forbidden_param', $response, 401 );
 	}
@@ -594,5 +594,5 @@
 
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/comments' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$comments = $response->get_data();
 		$this->assertCount( 4, $comments );
@@ -601,5 +601,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 		$request->set_param( 'author_exclude', self::$author_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$comments = $response->get_data();
@@ -608,5 +608,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 		$request->set_param( 'author_exclude', array( self::$author_id, self::$subscriber_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$comments = $response->get_data();
@@ -615,10 +615,10 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 		$request->set_param( 'author_exclude', 'skippy' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 		// Unavailable to unauthenticated; defaults to error
 		wp_set_current_user( 0 );
 		$request->set_param( 'author_exclude', array( self::$author_id, self::$subscriber_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_forbidden_param', $response, 401 );
 	}
@@ -637,17 +637,17 @@
 		// All comments in the database
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/comments' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 5, $response->get_data() );
 		// Limit to the parent
 		$request->set_param( 'parent', $parent_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 1, $response->get_data() );
 		// Limit to two parents
 		$request->set_param( 'parent', array( $parent_id, $parent_id2 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 2, $response->get_data() );
 		// Invalid parent should error
 		$request->set_param( 'parent', 'invalid' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -666,17 +666,17 @@
 		// All comments in the database
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/comments' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 5, $response->get_data() );
 		// Exclude this particular parent
 		$request->set_param( 'parent_exclude', $parent_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 4, $response->get_data() );
 		// Exclude both comment parents
 		$request->set_param( 'parent_exclude', array( $parent_id, $parent_id2 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 3, $response->get_data() );
 		// Invalid parent id should error
 		$request->set_param( 'parent_exclude', 'invalid' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -697,9 +697,9 @@
 		// 3 comments, plus 1 created in construct
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/comments' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 4, $response->get_data() );
 		// One matching comments
 		$request->set_param( 'search', 'foo' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertCount( 1, $data );
@@ -719,5 +719,5 @@
 		}
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/comments' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 50, $headers['X-WP-Total'] );
@@ -739,5 +739,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 		$request->set_param( 'page', 3 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 51, $headers['X-WP-Total'] );
@@ -758,5 +758,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 		$request->set_param( 'page', 6 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 51, $headers['X-WP-Total'] );
@@ -772,5 +772,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 		$request->set_param( 'page', 8 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 51, $headers['X-WP-Total'] );
@@ -789,5 +789,5 @@
 		$request->set_param( 'after', rand_str() );
 		$request->set_param( 'before', rand_str() );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -816,5 +816,5 @@
 		$request->set_param( 'after', '2016-01-15T00:00:00Z' );
 		$request->set_param( 'before', '2016-01-17T00:00:00Z' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertCount( 1, $data );
@@ -825,5 +825,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/comments/%d', self::$approved_id ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -841,5 +841,5 @@
 		);
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -851,5 +851,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/comments/%d', self::$approved_id ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data = $response->get_data();
@@ -869,5 +869,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments/' . REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_comment_invalid_id', $response, 404 );
 	}
@@ -877,5 +877,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/comments/%s', self::$approved_id ) );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_forbidden_context', $response, 401 );
 	}
@@ -891,5 +891,5 @@
 		$request    = new WP_REST_Request( 'GET', '/wp/v2/comments/' . $comment_id );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_post_invalid_id', $response, 404 );
 	}
@@ -905,5 +905,5 @@
 		$request    = new WP_REST_Request( 'GET', '/wp/v2/comments/' . $comment_id );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_post_invalid_id', $response, 404 );
 	}
@@ -914,5 +914,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/comments/%d', self::$hold_id ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_read', $response, 401 );
 	}
@@ -923,5 +923,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/comments/%d', self::$hold_id ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 	}
@@ -946,5 +946,5 @@
 
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/comments/%s', $comment_id_1 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$this->assertArrayHasKey( 'children', $response->get_links() );
@@ -961,5 +961,5 @@
 
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/comments/%s', $comment_id_1 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$this->assertArrayNotHasKey( 'children', $response->get_links() );
@@ -974,5 +974,5 @@
 		$password_comment = $this->factory->comment->create( $args );
 		$request          = new WP_REST_Request( 'GET', sprintf( '/wp/v2/comments/%s', $password_comment ) );
-		$response         = $this->server->dispatch( $request );
+		$response         = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_read', $response, 403 );
 	}
@@ -993,5 +993,5 @@
 		$request->set_param( 'password', 'toomanysecrets' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 	}
@@ -1013,5 +1013,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 201, $response->get_status() );
 
@@ -1084,5 +1084,5 @@
 			$request->set_param( 'date_gmt', $params['date_gmt'] );
 		}
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		update_option( 'timezone_string', '' );
@@ -1118,5 +1118,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 201, $response->get_status() );
 
@@ -1143,5 +1143,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'test_rest_premade_error', $response, 418 );
@@ -1166,5 +1166,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_comment_author_data_required', $response, 400 );
@@ -1186,5 +1186,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_comment_author_data_required', $response, 400 );
@@ -1205,5 +1205,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_comment_author_data_required', $response, 400 );
 	}
@@ -1224,5 +1224,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_comment_author_data_required', $response, 400 );
 	}
@@ -1241,5 +1241,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
@@ -1263,10 +1263,10 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_comment_content_invalid', $response, 400 );
 
 		$params['content'] = '';
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_comment_content_invalid', $response, 400 );
 	}
@@ -1288,5 +1288,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -1314,5 +1314,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 201, $response->get_status() );
 
@@ -1340,5 +1340,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 201, $response->get_status() );
 
@@ -1351,5 +1351,5 @@
 		$collection = new WP_REST_Request( 'GET', '/wp/v2/comments' );
 		$collection->set_param( 'post', $post_id );
-		$collection_response = $this->server->dispatch( $collection );
+		$collection_response = rest_get_server()->dispatch( $collection );
 		$collection_data     = $collection_response->get_data();
 		$this->assertEquals( $comment_id, $collection_data[0]['id'] );
@@ -1378,5 +1378,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_comment_type', $response, 400 );
 	}
@@ -1400,5 +1400,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -1426,5 +1426,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 201, $response->get_status() );
@@ -1455,5 +1455,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 201, $response->get_status() );
@@ -1480,5 +1480,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_comment_invalid_author', $response, 403 );
@@ -1500,5 +1500,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
@@ -1521,5 +1521,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_comment_invalid_status', $response, 403 );
@@ -1545,5 +1545,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 201, $response->get_status() );
 
@@ -1570,5 +1570,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 201, $response->get_status() );
 
@@ -1594,5 +1594,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response    = $this->server->dispatch( $request );
+		$response    = rest_get_server()->dispatch( $request );
 		$data        = $response->get_data();
 		$new_comment = get_comment( $data['id'] );
@@ -1616,5 +1616,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -1633,5 +1633,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_comment_invalid_author_ip', $response, 403 );
 	}
@@ -1650,5 +1650,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response    = $this->server->dispatch( $request );
+		$response    = rest_get_server()->dispatch( $request );
 		$data        = $response->get_data();
 		$new_comment = get_comment( $data['id'] );
@@ -1670,5 +1670,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_comment_invalid_post_id', $response, 403 );
@@ -1689,5 +1689,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_comment_invalid_post_id', $response, 403 );
 	}
@@ -1709,5 +1709,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_comment_invalid_post_id', $response, 403 );
 	}
@@ -1728,5 +1728,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_comment_draft_post', $response, 403 );
@@ -1748,5 +1748,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_comment_trash_post', $response, 403 );
@@ -1768,5 +1768,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_cannot_read_post', $response, 403 );
@@ -1788,5 +1788,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_read_post', $response, 403 );
 	}
@@ -1813,5 +1813,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 409, $response->get_status() );
@@ -1833,5 +1833,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 403, $response->get_status() );
@@ -1844,5 +1844,5 @@
 		$request = new WP_REST_Request( 'POST', '/wp/v2/comments' );
 		$request->set_param( 'post', self::$post_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 401, $response->get_status() );
 		$data = $response->get_data();
@@ -1863,5 +1863,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_comment_author_invalid', $response, 400 );
 	}
@@ -1881,5 +1881,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$result = $response->get_data();
@@ -1905,5 +1905,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 201, $response->get_status() );
 
@@ -1920,5 +1920,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 400, $response->get_status() );
 	}
@@ -1944,5 +1944,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		remove_filter( 'rest_allow_anonymous_comments', array( $this, 'anonymous_comments_callback_null' ), 10, 2 );
@@ -1969,5 +1969,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'comment_author_column_length', $response, 400 );
@@ -1992,5 +1992,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'comment_author_email_column_length', $response, 400 );
@@ -2015,5 +2015,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'comment_author_url_column_length', $response, 400 );
@@ -2038,5 +2038,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'comment_content_column_length', $response, 400 );
@@ -2057,5 +2057,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_cannot_read_post', $response, 403 );
@@ -2077,5 +2077,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 201, $response->get_status() );
 	}
@@ -2100,5 +2100,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -2133,5 +2133,5 @@
 			$request->set_param( 'date_gmt', $params['date_gmt'] );
 		}
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		update_option( 'timezone_string', '' );
@@ -2159,5 +2159,5 @@
 
 		// Sending a request without content is fine.
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -2165,5 +2165,5 @@
 		$request->set_param( 'author_email', 'yetanother@email.com' );
 		$request->set_param( 'content', '' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_comment_content_invalid', $response, 400 );
 	}
@@ -2178,8 +2178,8 @@
 		// Run twice to make sure that the update still succeeds even if no DB
 		// rows are updated.
-		$response = $this->server->dispatch( $request );
-		$this->assertEquals( 200, $response->get_status() );
-
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
+		$this->assertEquals( 200, $response->get_status() );
+
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 	}
@@ -2202,5 +2202,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -2229,5 +2229,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -2250,5 +2250,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -2273,5 +2273,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 	}
@@ -2292,5 +2292,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 	}
@@ -2310,5 +2310,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 	}
@@ -2329,5 +2329,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 	}
@@ -2346,5 +2346,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
@@ -2363,5 +2363,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_comment_invalid_type', $response, 404 );
 	}
@@ -2379,5 +2379,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 200, $response->get_status() );
@@ -2400,5 +2400,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -2416,5 +2416,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -2430,5 +2430,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_comment_invalid_id', $response, 404 );
 	}
@@ -2440,5 +2440,5 @@
 		$request->set_param( 'post', REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_comment_invalid_post_id', $response, 403 );
 	}
@@ -2454,5 +2454,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_edit', $response, 401 );
 	}
@@ -2476,5 +2476,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_edit', $response, 403 );
 	}
@@ -2500,5 +2500,5 @@
 		// Check if comment 1 does not have the child link.
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/comments/%s', $comment_id_1 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$this->assertArrayNotHasKey( 'children', $response->get_links() );
@@ -2508,10 +2508,10 @@
 		$request->set_param( 'parent', $comment_id_1 );
 		$request->set_param( 'content', rand_str() );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
 		// Check if comment 1 now has the child link.
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/comments/%s', $comment_id_1 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$this->assertArrayHasKey( 'children', $response->get_links() );
@@ -2532,5 +2532,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'comment_author_column_length', $response, 400 );
@@ -2551,5 +2551,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'comment_author_email_column_length', $response, 400 );
@@ -2570,5 +2570,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'comment_author_url_column_length', $response, 400 );
@@ -2588,5 +2588,5 @@
 		$request->add_header( 'content-type', 'application/json' );
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'comment_content_column_length', $response, 400 );
@@ -2601,5 +2601,5 @@
 			$request->set_param( $name, $value );
 		}
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 201, $response->get_status() );
 		$actual_output = $response->get_data();
@@ -2627,5 +2627,5 @@
 		// See https://core.trac.wordpress.org/ticket/38700
 		$request->set_param( 'author_ip', '127.0.0.2' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$actual_output = $response->get_data();
@@ -2751,5 +2751,5 @@
 		$request = new WP_REST_Request( 'DELETE', sprintf( '/wp/v2/comments/%d', $comment_id ) );
 		$request->set_param( 'force', 'false' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -2771,5 +2771,5 @@
 		$request['force'] = true;
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -2789,8 +2789,8 @@
 		);
 		$request    = new WP_REST_Request( 'DELETE', sprintf( '/wp/v2/comments/%d', $comment_id ) );
-		$response   = $this->server->dispatch( $request );
+		$response   = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data     = $response->get_data();
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_already_trashed', $response, 410 );
 	}
@@ -2801,5 +2801,5 @@
 		$request = new WP_REST_Request( 'DELETE', sprintf( '/wp/v2/comments/%d', REST_TESTS_IMPOSSIBLY_HIGH_NUMBER ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_comment_invalid_id', $response, 404 );
 	}
@@ -2810,5 +2810,5 @@
 		$request = new WP_REST_Request( 'DELETE', sprintf( '/wp/v2/comments/%d', self::$approved_id ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_delete', $response, 403 );
 	}
@@ -2834,10 +2834,10 @@
 
 		$request  = new WP_REST_Request( 'DELETE', sprintf( '/wp/v2/comments/%s', $child_comment ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
 		// Verify children link is gone.
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/comments/%s', $comment_id_1 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$this->assertArrayNotHasKey( 'children', $response->get_links() );
@@ -2846,5 +2846,5 @@
 	public function test_get_item_schema() {
 		$request    = new WP_REST_Request( 'OPTIONS', '/wp/v2/comments' );
-		$response   = $this->server->dispatch( $request );
+		$response   = rest_get_server()->dispatch( $request );
 		$data       = $response->get_data();
 		$properties = $data['schema']['properties'];
@@ -2878,5 +2878,5 @@
 		update_option( 'show_avatars', false );
 		$request    = new WP_REST_Request( 'OPTIONS', '/wp/v2/users' );
-		$response   = $this->server->dispatch( $request );
+		$response   = rest_get_server()->dispatch( $request );
 		$data       = $response->get_data();
 		$properties = $data['schema']['properties'];
@@ -2904,5 +2904,5 @@
 		$request = new WP_REST_Request( 'OPTIONS', '/wp/v2/comments' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -2912,5 +2912,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/comments/' . self::$approved_id );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertArrayHasKey( 'my_custom_int', $response->data );
 
@@ -2924,5 +2924,5 @@
 
 		wp_set_current_user( 1 );
-		$this->server->dispatch( $request );
+		rest_get_server()->dispatch( $request );
 		$this->assertEquals( 123, get_comment_meta( self::$approved_id, 'my_custom_int', true ) );
 
@@ -2937,5 +2937,5 @@
 		);
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 123, $response->data['my_custom_int'] );
@@ -2972,5 +2972,5 @@
 		);
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
Index: /trunk/tests/phpunit/tests/rest-api/rest-pages-controller.php
===================================================================
--- /trunk/tests/phpunit/tests/rest-api/rest-pages-controller.php	(revision 42723)
+++ /trunk/tests/phpunit/tests/rest-api/rest-pages-controller.php	(revision 42724)
@@ -38,5 +38,5 @@
 
 	public function test_register_routes() {
-		$routes = $this->server->get_routes();
+		$routes = rest_get_server()->get_routes();
 		$this->assertArrayHasKey( '/wp/v2/pages', $routes );
 		$this->assertCount( 2, $routes['/wp/v2/pages'] );
@@ -48,5 +48,5 @@
 		// Collection
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/pages' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -55,5 +55,5 @@
 		$page_id  = $this->factory->post->create( array( 'post_type' => 'page' ) );
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/pages/' . $page_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -63,5 +63,5 @@
 	public function test_registered_query_params() {
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/pages' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$keys     = array_keys( $data['endpoints'][0]['args'] );
@@ -105,5 +105,5 @@
 		);
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/pages' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 1, count( $data ) );
@@ -127,10 +127,10 @@
 		// No parent
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/pages' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 2, count( $data ) );
 		// Filter to parent
 		$request->set_param( 'parent', $id1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 1, count( $data ) );
@@ -138,5 +138,5 @@
 		// Invalid parent should fail
 		$request->set_param( 'parent', 'some-slug' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -171,10 +171,10 @@
 		// No parent
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/pages' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 4, count( $data ) );
 		// Filter to parents
 		$request->set_param( 'parent', array( $id1, $id3 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 2, count( $data ) );
@@ -198,10 +198,10 @@
 		// No parent
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/pages' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 2, count( $data ) );
 		// Filter to parent
 		$request->set_param( 'parent_exclude', $id1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 1, count( $data ) );
@@ -209,5 +209,5 @@
 		// Invalid parent_exclude should error
 		$request->set_param( 'parent_exclude', 'some-slug' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -243,10 +243,10 @@
 		// No parent
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/pages' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEqualSets( array( $id1, $id2, $id3, $id4 ), wp_list_pluck( $data, 'id' ) );
 		// Filter to menu_order
 		$request->set_param( 'menu_order', 1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEqualSets( array( $id4 ), wp_list_pluck( $data, 'id' ) );
@@ -255,5 +255,5 @@
 		$request->set_param( 'order', 'asc' );
 		$request->set_param( 'orderby', 'menu_order' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( $id1, $data[0]['id'] );
@@ -264,5 +264,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/pages' );
 		$request->set_param( 'menu_order', 'top-first' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -271,5 +271,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/pages' );
 		$request->set_param( 'per_page', 0 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 		$data = $response->get_data();
@@ -278,5 +278,5 @@
 		$this->assertContains( 'per_page must be between 1 (inclusive) and 100 (inclusive)', $first_error );
 		$request->set_param( 'per_page', 101 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 		$data        = $response->get_data();
@@ -302,10 +302,10 @@
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/pages' );
 		$request->set_param( 'status', 'draft' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 
 		// But they are accessible to authorized users
 		wp_set_current_user( self::$editor_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertCount( 1, $data );
@@ -317,5 +317,5 @@
 		$request->set_param( 'after', rand_str() );
 		$request->set_param( 'before', rand_str() );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -343,5 +343,5 @@
 		$request->set_param( 'after', '2016-01-15T00:00:00Z' );
 		$request->set_param( 'before', '2016-01-17T00:00:00Z' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertCount( 1, $data );
@@ -356,5 +356,5 @@
 		$post_id  = $this->factory->post->create();
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/pages/' . $post_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 404, $response->get_status() );
 	}
@@ -374,5 +374,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data     = $response->get_data();
@@ -397,5 +397,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 201, $response->get_status() );
@@ -420,5 +420,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_post_invalid_id', $response, 400 );
@@ -440,5 +440,5 @@
 		$request = new WP_REST_Request( 'DELETE', sprintf( '/wp/v2/pages/%d', $page_id ) );
 		$request->set_param( 'force', 'false' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 200, $response->get_status() );
@@ -466,5 +466,5 @@
 			)
 		);
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 200, $response->get_status() );
@@ -498,5 +498,5 @@
 			)
 		);
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$new_data = $response->get_data();
@@ -522,5 +522,5 @@
 			)
 		);
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$new_data = $response->get_data();
@@ -546,5 +546,5 @@
 			)
 		);
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$new_data = $response->get_data();
 		$this->assertEquals( $page_id1, $new_data['parent'] );
@@ -570,5 +570,5 @@
 			)
 		);
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$new_data = $response->get_data();
 		$this->assertEquals( 0, $new_data['parent'] );
@@ -584,5 +584,5 @@
 
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/pages/%d', $page_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data = $response->get_data();
@@ -606,5 +606,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/pages/%d', $page_id ) );
 		$request->set_param( 'password', '$inthebananastand' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data = $response->get_data();
@@ -626,5 +626,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/pages/%d', $page_id ) );
 		$request->set_param( 'password', 'wrongpassword' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_post_incorrect_password', $response, 403 );
@@ -641,5 +641,5 @@
 		);
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/pages/%d', $page_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( '', $data['content']['rendered'] );
@@ -651,5 +651,5 @@
 	public function test_get_item_schema() {
 		$request    = new WP_REST_Request( 'OPTIONS', '/wp/v2/pages' );
-		$response   = $this->server->dispatch( $request );
+		$response   = rest_get_server()->dispatch( $request );
 		$data       = $response->get_data();
 		$properties = $data['schema']['properties'];
Index: /trunk/tests/phpunit/tests/rest-api/rest-post-meta-fields.php
===================================================================
--- /trunk/tests/phpunit/tests/rest-api/rest-post-meta-fields.php	(revision 42723)
+++ /trunk/tests/phpunit/tests/rest-api/rest-post-meta-fields.php	(revision 42724)
@@ -123,6 +123,6 @@
 		/** @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 );
 	}
 
@@ -141,5 +141,5 @@
 
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', self::$post_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 200, $response->get_status() );
@@ -160,5 +160,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', self::$post_id ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -172,5 +172,5 @@
 		add_post_meta( self::$post_id, 'test_multi', 'value2' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -187,5 +187,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', self::$post_id ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -202,5 +202,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', self::$post_id ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -217,5 +217,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', self::$post_id ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -250,6 +250,6 @@
 		/** @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 );
 
 		add_post_meta( self::$post_id, 'test_string', 42 );
@@ -258,5 +258,5 @@
 
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', self::$post_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -281,5 +281,5 @@
 
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', self::$post_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 200, $response->get_status() );
@@ -311,5 +311,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -343,5 +343,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -371,5 +371,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_edit', $response, 401 );
 
@@ -393,5 +393,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_update', $response, 403 );
 		$this->assertEmpty( get_post_meta( self::$post_id, 'test_bad_auth', false ) );
@@ -421,5 +421,5 @@
 		add_filter( 'query', array( $this, 'error_insert_query' ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		remove_filter( 'query', array( $this, 'error_insert_query' ) );
 		$wpdb->show_errors = true;
@@ -442,5 +442,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEmpty( get_post_meta( self::$post_id, 'test_invalid_type', false ) );
 	}
@@ -461,5 +461,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -477,5 +477,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -505,5 +505,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -533,5 +533,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_edit', $response, 401 );
 
@@ -559,5 +559,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -582,5 +582,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -605,5 +605,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 1, $data['meta']['my_meta_key'] );
@@ -629,5 +629,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( array( 1, 2, 3 ), $data['meta']['my_meta_key'] );
@@ -649,5 +649,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_update', $response, 403 );
 		$this->assertEmpty( get_post_meta( self::$post_id, 'test_bad_auth_multi', false ) );
@@ -677,5 +677,5 @@
 		add_filter( 'query', array( $this, 'error_insert_query' ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		remove_filter( 'query', array( $this, 'error_insert_query' ) );
 		$wpdb->show_errors = true;
@@ -702,5 +702,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -731,5 +731,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -747,5 +747,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -775,5 +775,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -804,5 +804,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -820,5 +820,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -847,5 +847,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
@@ -877,5 +877,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 
@@ -912,5 +912,5 @@
 		add_filter( 'query', array( $this, 'error_delete_query' ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		remove_filter( 'query', array( $this, 'error_delete_query' ) );
 		$wpdb->show_errors = true;
@@ -935,5 +935,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -960,5 +960,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_delete', $response, 403 );
 
@@ -992,5 +992,5 @@
 		add_filter( 'query', array( $this, 'error_delete_query' ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		remove_filter( 'query', array( $this, 'error_delete_query' ) );
 		$wpdb->show_errors = true;
@@ -1014,5 +1014,5 @@
 		$request->set_body_params( $data );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -1023,5 +1023,5 @@
 	public function test_get_schema() {
 		$request  = new WP_REST_Request( 'OPTIONS', sprintf( '/wp/v2/posts/%d', self::$post_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data   = $response->get_data();
Index: /trunk/tests/phpunit/tests/rest-api/rest-post-statuses-controller.php
===================================================================
--- /trunk/tests/phpunit/tests/rest-api/rest-post-statuses-controller.php	(revision 42723)
+++ /trunk/tests/phpunit/tests/rest-api/rest-post-statuses-controller.php	(revision 42724)
@@ -13,5 +13,5 @@
 
 	public function test_register_routes() {
-		$routes = $this->server->get_routes();
+		$routes = rest_get_server()->get_routes();
 		$this->assertArrayHasKey( '/wp/v2/statuses', $routes );
 		$this->assertArrayHasKey( '/wp/v2/statuses/(?P<status>[\w-]+)', $routes );
@@ -21,5 +21,5 @@
 		// Collection
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/statuses' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -27,5 +27,5 @@
 		// Single
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/statuses/publish' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -35,5 +35,5 @@
 	public function test_get_items() {
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/statuses' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data     = $response->get_data();
@@ -48,5 +48,5 @@
 
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/statuses' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data = $response->get_data();
@@ -67,5 +67,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/statuses' );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_view', $response, 401 );
 	}
@@ -76,5 +76,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/statuses/publish' );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_post_status_object_response( $response );
 	}
@@ -82,5 +82,5 @@
 	public function test_get_item_invalid_status() {
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/statuses/invalid' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_status_invalid', $response, 404 );
 	}
@@ -89,5 +89,5 @@
 		wp_set_current_user( 0 );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/statuses/draft' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_read_status', $response, 401 );
 	}
@@ -98,5 +98,5 @@
 
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/statuses/inherit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_read_status', $response, 403 );
 	}
@@ -105,5 +105,5 @@
 		/** Post statuses can't be created */
 		$request  = new WP_REST_Request( 'POST', '/wp/v2/statuses' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 404, $response->get_status() );
 	}
@@ -112,5 +112,5 @@
 		/** Post statuses can't be updated */
 		$request  = new WP_REST_Request( 'POST', '/wp/v2/statuses/draft' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 404, $response->get_status() );
 	}
@@ -119,5 +119,5 @@
 		/** Post statuses can't be deleted */
 		$request  = new WP_REST_Request( 'DELETE', '/wp/v2/statuses/draft' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 404, $response->get_status() );
 	}
@@ -134,5 +134,5 @@
 	public function test_get_item_schema() {
 		$request    = new WP_REST_Request( 'OPTIONS', '/wp/v2/statuses' );
-		$response   = $this->server->dispatch( $request );
+		$response   = rest_get_server()->dispatch( $request );
 		$data       = $response->get_data();
 		$properties = $data['schema']['properties'];
@@ -166,5 +166,5 @@
 		$request = new WP_REST_Request( 'OPTIONS', '/wp/v2/statuses' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -174,5 +174,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/statuses/publish' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertArrayHasKey( 'my_custom_int', $response->data );
 
Index: /trunk/tests/phpunit/tests/rest-api/rest-post-types-controller.php
===================================================================
--- /trunk/tests/phpunit/tests/rest-api/rest-post-types-controller.php	(revision 42723)
+++ /trunk/tests/phpunit/tests/rest-api/rest-post-types-controller.php	(revision 42724)
@@ -13,5 +13,5 @@
 
 	public function test_register_routes() {
-		$routes = $this->server->get_routes();
+		$routes = rest_get_server()->get_routes();
 		$this->assertArrayHasKey( '/wp/v2/types', $routes );
 		$this->assertArrayHasKey( '/wp/v2/types/(?P<type>[\w-]+)', $routes );
@@ -21,5 +21,5 @@
 		// Collection
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/types' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -27,5 +27,5 @@
 		// Single
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/types/post' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -35,5 +35,5 @@
 	public function test_get_items() {
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/types' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data       = $response->get_data();
@@ -51,5 +51,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/types' );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_view', $response, 401 );
 	}
@@ -57,5 +57,5 @@
 	public function test_get_item() {
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/types/post' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_post_type_object_response( 'view', $response );
 		$data = $response->get_data();
@@ -65,5 +65,5 @@
 	public function test_get_item_page() {
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/types/page' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_post_type_object_response( 'view', $response, 'page' );
 		$data = $response->get_data();
@@ -73,5 +73,5 @@
 	public function test_get_item_invalid_type() {
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/types/invalid' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_type_invalid', $response, 404 );
 	}
@@ -82,5 +82,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/types/post' );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_post_type_object_response( 'edit', $response );
 	}
@@ -90,5 +90,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/types/post' );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_forbidden_context', $response, 401 );
 	}
@@ -97,5 +97,5 @@
 		/** Post types can't be created */
 		$request  = new WP_REST_Request( 'POST', '/wp/v2/types' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 404, $response->get_status() );
 	}
@@ -104,5 +104,5 @@
 		/** Post types can't be updated */
 		$request  = new WP_REST_Request( 'POST', '/wp/v2/types/post' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 404, $response->get_status() );
 	}
@@ -111,5 +111,5 @@
 		/** Post types can't be deleted */
 		$request  = new WP_REST_Request( 'DELETE', '/wp/v2/types/post' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 404, $response->get_status() );
 	}
@@ -126,5 +126,5 @@
 	public function test_get_item_schema() {
 		$request    = new WP_REST_Request( 'OPTIONS', '/wp/v2/types' );
-		$response   = $this->server->dispatch( $request );
+		$response   = rest_get_server()->dispatch( $request );
 		$data       = $response->get_data();
 		$properties = $data['schema']['properties'];
@@ -160,5 +160,5 @@
 		$request = new WP_REST_Request( 'OPTIONS', '/wp/v2/types/schema' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -168,5 +168,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/types/post' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertArrayHasKey( 'my_custom_int', $response->data );
 
Index: /trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php
===================================================================
--- /trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php	(revision 42723)
+++ /trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php	(revision 42724)
@@ -111,5 +111,5 @@
 
 	public function test_register_routes() {
-		$routes = $this->server->get_routes();
+		$routes = rest_get_server()->get_routes();
 
 		$this->assertArrayHasKey( '/wp/v2/posts', $routes );
@@ -122,5 +122,5 @@
 		// Collection
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/posts' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -128,5 +128,5 @@
 		// Single
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/posts/' . self::$post_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -136,5 +136,5 @@
 	public function test_registered_query_params() {
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/posts' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$keys     = array_keys( $data['endpoints'][0]['args'] );
@@ -168,5 +168,5 @@
 	public function test_registered_get_item_params() {
 		$request  = new WP_REST_Request( 'OPTIONS', sprintf( '/wp/v2/posts/%d', self::$post_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$keys     = array_keys( $data['endpoints'][0]['args'] );
@@ -177,5 +177,5 @@
 	public function test_get_items() {
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/posts' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->check_get_posts_response( $response );
@@ -194,5 +194,5 @@
 			)
 		);
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEmpty( $response->get_data() );
@@ -205,5 +205,5 @@
 		// All 3 posts
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/posts' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$this->assertEquals( 3, count( $response->get_data() ) );
@@ -211,5 +211,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'author', array( self::$editor_id, self::$author_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -219,5 +219,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'author', self::$editor_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -231,5 +231,5 @@
 		// All 3 posts
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/posts' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$this->assertEquals( 3, count( $response->get_data() ) );
@@ -237,5 +237,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'author_exclude', array( self::$editor_id, self::$author_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -246,5 +246,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'author_exclude', self::$editor_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -255,5 +255,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'author_exclude', 'invalid' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -266,5 +266,5 @@
 		// Orderby=>desc
 		$request->set_param( 'include', array( $id1, $id3 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 2, count( $data ) );
@@ -273,5 +273,5 @@
 		// Orderby=>include
 		$request->set_param( 'orderby', 'include' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 2, count( $data ) );
@@ -281,5 +281,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'include', 'invalid' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -309,5 +309,5 @@
 		$request->set_param( 'orderby', 'author' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -333,5 +333,5 @@
 		$request->set_param( 'orderby', 'modified' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -369,5 +369,5 @@
 		$request->set_param( 'orderby', 'parent' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -386,5 +386,5 @@
 		$id2      = $this->factory->post->create( array( 'post_status' => 'publish' ) );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/posts' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertTrue( in_array( $id1, wp_list_pluck( $data, 'id' ), true ) );
@@ -392,5 +392,5 @@
 
 		$request->set_param( 'exclude', array( $id2 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertTrue( in_array( $id1, wp_list_pluck( $data, 'id' ), true ) );
@@ -398,5 +398,5 @@
 
 		$request->set_param( 'exclude', "$id2" );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertTrue( in_array( $id1, wp_list_pluck( $data, 'id' ), true ) );
@@ -404,5 +404,5 @@
 
 		$request->set_param( 'exclude', 'invalid' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -419,9 +419,9 @@
 		);
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/posts' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 7, count( $response->get_data() ) );
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'search', 'Search Result' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 1, count( $data ) );
@@ -444,5 +444,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'slug', 'apple' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -472,5 +472,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'slug', array( 'banana', 'peach' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -505,5 +505,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'slug', 'apple,banana' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -522,15 +522,15 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'status', 'publish' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$this->assertEquals( 1, count( $response->get_data() ) );
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'status', 'draft' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 		wp_set_current_user( self::$editor_id );
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'status', 'draft' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$this->assertEquals( 1, count( $response->get_data() ) );
@@ -548,5 +548,5 @@
 		$request->set_param( 'status', 'draft,private' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -571,5 +571,5 @@
 		$request->set_param( 'status', array( 'draft', 'pending' ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -587,5 +587,5 @@
 		$request->set_param( 'context', 'edit' );
 		$request->set_param( 'status', array( 'draft', 'nonsense' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -595,5 +595,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'status', 'invalid' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -608,5 +608,5 @@
 
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/posts' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 200, $response->get_status() );
@@ -647,5 +647,5 @@
 		// order defaults to 'desc'
 		$request->set_param( 'orderby', 'title' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'Apple Sauce', $data[0]['title']['rendered'] );
@@ -653,5 +653,5 @@
 		// order=>asc
 		$request->set_param( 'order', 'asc' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'Apple Cobbler', $data[0]['title']['rendered'] );
@@ -659,10 +659,10 @@
 		// order=>asc,id should fail
 		$request->set_param( 'order', 'asc,id' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 		// orderby=>content should fail (invalid param test)
 		$request->set_param( 'order', 'asc' );
 		$request->set_param( 'orderby', 'content' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -673,5 +673,5 @@
 		$request->set_param( 'orderby', 'include' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_orderby_include_missing_include', $response, 400 );
@@ -702,5 +702,5 @@
 		$request->set_param( 'include', array( $id1, $id2, $id3 ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -732,5 +732,5 @@
 		$request->set_param( 'include', array( $id1, $id2 ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -757,5 +757,5 @@
 		$request->set_param( 'slug', array( 'taco', 'chalupa', 'burrito' ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -783,5 +783,5 @@
 		$request->set_param( 'orderby', 'relevance' );
 		$request->set_param( 'search', 'relevant' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -810,5 +810,5 @@
 		$request->set_param( 'orderby', 'relevance' );
 		$request->set_param( 'search', 'relevant content' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -822,5 +822,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'orderby', 'relevance' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_no_search_term_defined', $response, 400 );
 	}
@@ -833,17 +833,17 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'offset', 1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 3, $response->get_data() );
 		// 'offset' works with 'per_page'
 		$request->set_param( 'per_page', 2 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 2, $response->get_data() );
 		// 'offset' takes priority over 'page'
 		$request->set_param( 'page', 2 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 2, $response->get_data() );
 		// Invalid 'offset' should error
 		$request->set_param( 'offset', 'moreplease' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -860,5 +860,5 @@
 		$request->set_param( 'tags', array( $tag['term_id'] ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertCount( 1, $data );
@@ -877,5 +877,5 @@
 		$request->set_param( 'tags_exclude', array( $tag['term_id'] ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertCount( 3, $data );
@@ -901,9 +901,9 @@
 		$request->set_param( 'categories', array( $category['term_id'] ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 1, $response->get_data() );
 
 		$request->set_param( 'tags', array( 'my-tag' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -925,5 +925,5 @@
 		$request->set_param( 'categories_exclude', array( $category['term_id'] ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertCount( 1, $data );
@@ -931,5 +931,5 @@
 
 		$request->set_param( 'tags_exclude', array( 'my-tag' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -944,5 +944,5 @@
 		$request->set_param( 'sticky', true );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 1, $response->get_data() );
 
@@ -952,5 +952,5 @@
 
 		$request->set_param( 'sticky', 'nothanks' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -967,5 +967,5 @@
 		$request->set_param( 'include', array( $id1 ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 0, $response->get_data() );
 
@@ -982,5 +982,5 @@
 		$request->set_param( 'include', array( $id1 ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertCount( 1, $response->get_data() );
@@ -1001,5 +1001,5 @@
 		$request->set_param( 'sticky', true );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 0, $response->get_data() );
 
@@ -1020,5 +1020,5 @@
 		$request->set_param( 'include', array( $id1 ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 0, $response->get_data() );
 
@@ -1039,5 +1039,5 @@
 		$request->set_param( 'sticky', false );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 1, $response->get_data() );
 
@@ -1060,5 +1060,5 @@
 		$request->set_param( 'exclude', array( $id3 ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 1, $response->get_data() );
 
@@ -1081,5 +1081,5 @@
 		$request->set_param( 'exclude', array( $id3 ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 2, $response->get_data() );
 
@@ -1102,5 +1102,5 @@
 		}
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/posts' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 50, $headers['X-WP-Total'] );
@@ -1121,5 +1121,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'page', 3 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 51, $headers['X-WP-Total'] );
@@ -1140,5 +1140,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'page', 6 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 51, $headers['X-WP-Total'] );
@@ -1155,5 +1155,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'page', 8 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertErrorResponse( 'rest_post_invalid_page_number', $response, 400 );
@@ -1167,5 +1167,5 @@
 			)
 		);
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 51, $headers['X-WP-Total'] );
@@ -1193,10 +1193,10 @@
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'status', 'draft' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 
 		// But they are accessible to authorized users
 		wp_set_current_user( self::$editor_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertCount( 1, $data );
@@ -1207,5 +1207,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_query_params( array( 'per_page' => -1 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -1218,5 +1218,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'page', REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_post_invalid_page_number', $response, 400 );
 	}
@@ -1225,5 +1225,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
 		$request->set_param( 'context', 'banana' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -1233,5 +1233,5 @@
 		$request->set_param( 'after', rand_str() );
 		$request->set_param( 'before', rand_str() );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -1245,5 +1245,5 @@
 		$request->set_param( 'after', '2016-01-15T00:00:00Z' );
 		$request->set_param( 'before', '2016-01-17T00:00:00Z' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertCount( 1, $data );
@@ -1253,5 +1253,5 @@
 	public function test_get_items_all_post_formats() {
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/posts' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -1263,5 +1263,5 @@
 	public function test_get_item() {
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', self::$post_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->check_get_post_response( $response, 'view' );
@@ -1270,5 +1270,5 @@
 	public function test_get_item_links() {
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', self::$post_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$links = $response->get_links();
@@ -1313,5 +1313,5 @@
 	public function test_get_item_links_no_author() {
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', self::$post_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$links    = $response->get_links();
 		$this->assertFalse( isset( $links['author'] ) );
@@ -1323,5 +1323,5 @@
 		);
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', self::$post_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$links    = $response->get_links();
 		$this->assertEquals( rest_url( '/wp/v2/users/' . self::$author_id ), $links['author'][0]['href'] );
@@ -1337,5 +1337,5 @@
 
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', $draft_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_forbidden', $response, 401 );
@@ -1344,5 +1344,5 @@
 	public function test_get_post_invalid_id() {
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/posts/' . REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_post_invalid_id', $response, 404 );
@@ -1359,5 +1359,5 @@
 		wp_set_current_user( self::$editor_id );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->check_get_posts_response( $response, 'edit' );
@@ -1372,5 +1372,5 @@
 			)
 		);
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_forbidden_context', $response, 401 );
@@ -1385,5 +1385,5 @@
 			)
 		);
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_forbidden_context', $response, 401 );
@@ -1398,5 +1398,5 @@
 
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', $post_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->check_get_post_response( $response, 'view' );
@@ -1421,5 +1421,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', $post_id ) );
 		$request->set_param( 'password', '$inthebananastand' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->check_get_post_response( $response, 'view' );
@@ -1442,5 +1442,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', $post_id ) );
 		$request->set_param( 'password', 'wrongpassword' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_post_incorrect_password', $response, 403 );
@@ -1456,5 +1456,5 @@
 		);
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', $post_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->check_get_post_response( $response, 'view' );
@@ -1476,5 +1476,5 @@
 		);
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', self::$post_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		// Private status
@@ -1486,5 +1486,5 @@
 		);
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', self::$post_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 401, $response->get_status() );
 	}
@@ -1495,5 +1495,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', self::$post_id ) );
 		$request->set_query_params( array( 'context' => 'edit' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->check_get_post_response( $response, 'edit' );
@@ -1507,5 +1507,5 @@
 		$params = $this->set_post_data();
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->check_create_post_response( $response );
@@ -1598,5 +1598,5 @@
 			$request->set_param( 'date_gmt', $params['date_gmt'] );
 		}
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		update_option( 'timezone_string', '' );
@@ -1635,5 +1635,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data          = $response->get_data();
@@ -1659,5 +1659,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
@@ -1679,5 +1679,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data          = $response->get_data();
@@ -1695,5 +1695,5 @@
 		$params = $this->set_post_data();
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->check_create_post_response( $response );
@@ -1710,5 +1710,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_post_exists', $response, 400 );
@@ -1729,5 +1729,5 @@
 
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 201, $response->get_status() );
 
@@ -1752,5 +1752,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$new_data = $response->get_data();
@@ -1771,5 +1771,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_cannot_assign_sticky', $response, 403 );
@@ -1786,5 +1786,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_cannot_edit_others', $response, 403 );
@@ -1801,5 +1801,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_cannot_create', $response, 401 );
@@ -1816,5 +1816,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data     = $response->get_data();
@@ -1840,5 +1840,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data     = $response->get_data();
@@ -1864,5 +1864,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_cannot_publish', $response, 403 );
@@ -1884,5 +1884,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_cannot_publish', $response, 403 );
@@ -1899,5 +1899,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
@@ -1914,5 +1914,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data     = $response->get_data();
@@ -1932,5 +1932,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data     = $response->get_data();
@@ -1950,5 +1950,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
@@ -1970,5 +1970,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 201, $response->get_status() );
 
@@ -1996,5 +1996,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$new_post = get_post( $data['id'] );
@@ -2009,5 +2009,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 0, $data['featured_media'] );
@@ -2025,5 +2025,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_author', $response, 400 );
@@ -2040,5 +2040,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_cannot_edit_others', $response, 403 );
@@ -2055,5 +2055,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data = $response->get_data();
@@ -2071,5 +2071,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data = $response->get_data();
@@ -2089,5 +2089,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 201, $response->get_status() );
@@ -2107,5 +2107,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_field', $response, 400 );
@@ -2122,5 +2122,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data     = $response->get_data();
@@ -2141,5 +2141,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data     = $response->get_data();
@@ -2169,5 +2169,5 @@
 		add_filter( 'query', array( $this, 'error_insert_query' ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		remove_filter( 'query', array( $this, 'error_insert_query' ) );
 		$wpdb->show_errors = true;
@@ -2186,5 +2186,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
@@ -2201,5 +2201,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
@@ -2216,5 +2216,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$new_data = $response->get_data();
 		$this->assertEquals( "Rob O'Rourke's Diary", $new_data['title']['raw'] );
@@ -2234,5 +2234,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data = $response->get_data();
@@ -2251,5 +2251,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data = $response->get_data();
@@ -2269,5 +2269,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data = $response->get_data();
@@ -2293,5 +2293,5 @@
 
 		add_filter( 'map_meta_cap', array( $this, 'revoke_assign_term' ), 10, 4 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		remove_filter( 'map_meta_cap', array( $this, 'revoke_assign_term' ), 10, 4 );
 
@@ -2313,5 +2313,5 @@
 		$params = $this->set_post_data();
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->check_update_post_response( $response );
@@ -2336,8 +2336,8 @@
 		// Run twice to make sure that the update still succeeds even if no DB
 		// rows are updated.
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_update_post_response( $response );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_update_post_response( $response );
 	}
@@ -2350,5 +2350,5 @@
 		$params = $this->set_post_data();
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->check_update_post_response( $response );
@@ -2371,5 +2371,5 @@
 		$params = $this->set_raw_post_data();
 		$request->set_body( wp_json_encode( $params ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->check_update_post_response( $response );
@@ -2395,5 +2395,5 @@
 		unset( $params['status'] );
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->check_update_post_response( $response );
@@ -2411,5 +2411,5 @@
 		$params  = $this->set_post_data();
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_cannot_edit', $response, 403 );
@@ -2427,5 +2427,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_cannot_edit', $response, 403 );
@@ -2436,5 +2436,5 @@
 
 		$request  = new WP_REST_Request( 'PUT', sprintf( '/wp/v2/posts/%d', REST_TESTS_IMPOSSIBLY_HIGH_NUMBER ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_post_invalid_id', $response, 404 );
@@ -2445,5 +2445,5 @@
 
 		$request  = new WP_REST_Request( 'PUT', sprintf( '/wp/v2/pages/%d', self::$post_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_post_invalid_id', $response, 404 );
@@ -2460,5 +2460,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data     = $response->get_data();
@@ -2478,5 +2478,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data     = $response->get_data();
@@ -2496,5 +2496,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
@@ -2516,5 +2516,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -2537,5 +2537,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		// The readonly modified param should be ignored, request should be a success.
@@ -2567,5 +2567,5 @@
 			$request->set_param( 'date_gmt', $params['date_gmt'] );
 		}
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		update_option( 'timezone_string', '' );
@@ -2594,5 +2594,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
@@ -2609,5 +2609,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
@@ -2642,5 +2642,5 @@
 
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', $post_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -2651,5 +2651,5 @@
 		$request = new WP_REST_Request( 'PUT', sprintf( '/wp/v2/posts/%d', $post_id ) );
 		$request->set_param( 'date', '2016-02-23T13:00:00' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -2675,5 +2675,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$new_data = $response->get_data();
@@ -2693,5 +2693,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$new_data = $response->get_data();
@@ -2711,5 +2711,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$new_data = $response->get_data();
@@ -2726,5 +2726,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$new_data = $response->get_data();
@@ -2744,5 +2744,5 @@
 		);
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$new_data = $response->get_data();
 		$this->assertEquals( 'An Excerpt', $new_data['excerpt']['raw'] );
@@ -2759,5 +2759,5 @@
 		);
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$new_data = $response->get_data();
 		$this->assertEquals( '', $new_data['excerpt']['raw'] );
@@ -2774,5 +2774,5 @@
 		);
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$new_data = $response->get_data();
 		$this->assertEquals( 'Some Content', $new_data['content']['raw'] );
@@ -2789,5 +2789,5 @@
 		);
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$new_data = $response->get_data();
 		$this->assertEquals( '', $new_data['content']['raw'] );
@@ -2810,5 +2810,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( '', $data['password'] );
@@ -2826,5 +2826,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_field', $response, 400 );
@@ -2843,5 +2843,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_field', $response, 400 );
@@ -2865,5 +2865,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_field', $response, 400 );
@@ -2880,5 +2880,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$new_data = $response->get_data();
 		$this->assertEquals( "Rob O'Rourke's Diary", $new_data['title']['raw'] );
@@ -2900,5 +2900,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$new_data = $response->get_data();
 		$this->assertEquals( array( $category['term_id'] ), $new_data['categories'] );
@@ -2915,5 +2915,5 @@
 		unset( $args['rest_route'] );
 		$request->set_query_params( $args );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertCount( 1, $data );
@@ -2935,5 +2935,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$new_data = $response->get_data();
 		$this->assertEquals( array(), $new_data['categories'] );
@@ -2958,5 +2958,5 @@
 
 		add_filter( 'map_meta_cap', array( $this, 'revoke_assign_term' ), 10, 4 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		remove_filter( 'map_meta_cap', array( $this, 'revoke_assign_term' ), 10, 4 );
 
@@ -2984,5 +2984,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data          = $response->get_data();
@@ -3014,5 +3014,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data          = $response->get_data();
@@ -3042,5 +3042,5 @@
 		);
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 200, $response->get_status() );
@@ -3059,5 +3059,5 @@
 			$request->set_param( $name, $value );
 		}
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 201, $response->get_status() );
 		$actual_output = $response->get_data();
@@ -3082,5 +3082,5 @@
 			$request->set_param( $name, $value );
 		}
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$actual_output = $response->get_data();
@@ -3287,5 +3287,5 @@
 		$request = new WP_REST_Request( 'DELETE', sprintf( '/wp/v2/posts/%d', $post_id ) );
 		$request->set_param( 'force', 'false' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 200, $response->get_status() );
@@ -3301,5 +3301,5 @@
 		$request          = new WP_REST_Request( 'DELETE', sprintf( '/wp/v2/posts/%d', $post_id ) );
 		$request['force'] = true;
-		$response         = $this->server->dispatch( $request );
+		$response         = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 200, $response->get_status() );
@@ -3313,7 +3313,7 @@
 		wp_set_current_user( self::$editor_id );
 		$request  = new WP_REST_Request( 'DELETE', sprintf( '/wp/v2/posts/%d', $post_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_already_trashed', $response, 410 );
 	}
@@ -3323,5 +3323,5 @@
 
 		$request  = new WP_REST_Request( 'DELETE', '/wp/v2/posts/' . REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_post_invalid_id', $response, 404 );
@@ -3333,5 +3333,5 @@
 
 		$request  = new WP_REST_Request( 'DELETE', '/wp/v2/posts/' . $page_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_post_invalid_id', $response, 404 );
@@ -3342,5 +3342,5 @@
 
 		$request  = new WP_REST_Request( 'DELETE', sprintf( '/wp/v2/posts/%d', self::$post_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_cannot_delete', $response, 403 );
@@ -3356,5 +3356,5 @@
 		);
 		create_initial_rest_routes();
-		$routes = $this->server->get_routes();
+		$routes = rest_get_server()->get_routes();
 		$this->assertFalse( isset( $routes['/wp/v2/invalid-controller'] ) );
 		_unregister_post_type( 'invalid-controller' );
@@ -3364,5 +3364,5 @@
 	public function test_get_item_schema() {
 		$request    = new WP_REST_Request( 'OPTIONS', '/wp/v2/posts' );
-		$response   = $this->server->dispatch( $request );
+		$response   = rest_get_server()->dispatch( $request );
 		$data       = $response->get_data();
 		$properties = $data['schema']['properties'];
@@ -3400,5 +3400,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', self::$post_id ) );
 		$request->set_param( 'context', 'view' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$keys     = array_keys( $response->get_data() );
 		sort( $keys );
@@ -3438,5 +3438,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', self::$post_id ) );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$keys     = array_keys( $response->get_data() );
 		sort( $keys );
@@ -3475,5 +3475,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', self::$post_id ) );
 		$request->set_param( 'context', 'embed' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$keys     = array_keys( $response->get_data() );
 		sort( $keys );
@@ -3496,5 +3496,5 @@
 	public function test_status_array_enum_args() {
 		$request         = new WP_REST_Request( 'GET', '/wp/v2' );
-		$response        = $this->server->dispatch( $request );
+		$response        = rest_get_server()->dispatch( $request );
 		$data            = $response->get_data();
 		$list_posts_args = $data['routes']['/wp/v2/posts']['endpoints'][0]['args'];
@@ -3528,5 +3528,5 @@
 		$request = new WP_REST_Request( 'OPTIONS', '/wp/v2/posts' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -3540,5 +3540,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . $post_id );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertArrayHasKey( 'my_custom_int', $response->data );
 
@@ -3550,5 +3550,5 @@
 		);
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 123, get_post_meta( $post_id, 'my_custom_int', true ) );
 
@@ -3561,5 +3561,5 @@
 		);
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 123, $response->data['my_custom_int'] );
@@ -3594,5 +3594,5 @@
 		);
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
Index: /trunk/tests/phpunit/tests/rest-api/rest-revisions-controller.php
===================================================================
--- /trunk/tests/phpunit/tests/rest-api/rest-revisions-controller.php	(revision 42723)
+++ /trunk/tests/phpunit/tests/rest-api/rest-revisions-controller.php	(revision 42724)
@@ -68,5 +68,5 @@
 
 	public function test_register_routes() {
-		$routes = $this->server->get_routes();
+		$routes = rest_get_server()->get_routes();
 		$this->assertArrayHasKey( '/wp/v2/posts/(?P<parent>[\d]+)/revisions', $routes );
 		$this->assertArrayHasKey( '/wp/v2/posts/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)', $routes );
@@ -78,5 +78,5 @@
 		// Collection
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/posts/' . self::$post_id . '/revisions' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -84,5 +84,5 @@
 		// Single
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/posts/' . self::$post_id . '/revisions/' . $this->revision_1->ID );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -93,5 +93,5 @@
 		wp_set_current_user( self::$editor_id );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$post_id . '/revisions' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 200, $response->get_status() );
@@ -109,9 +109,9 @@
 		wp_set_current_user( 0 );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$post_id . '/revisions' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_cannot_read', $response, 401 );
 		wp_set_current_user( self::$contributor_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_read', $response, 403 );
 	}
@@ -120,5 +120,5 @@
 		wp_set_current_user( self::$editor_id );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/posts/' . REST_TESTS_IMPOSSIBLY_HIGH_NUMBER . '/revisions' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_post_invalid_parent', $response, 404 );
 	}
@@ -127,5 +127,5 @@
 		wp_set_current_user( self::$editor_id );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$page_id . '/revisions' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_post_invalid_parent', $response, 404 );
 	}
@@ -134,5 +134,5 @@
 		wp_set_current_user( self::$editor_id );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$post_id . '/revisions/' . $this->revision_id1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$this->check_get_revision_response( $response, $this->revision_1 );
@@ -160,5 +160,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$post_id . '/revisions/' . $this->revision_id1 );
 		$request->set_param( 'context', 'embed' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$fields   = array(
 			'author',
@@ -178,8 +178,8 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$post_id . '/revisions/' . $this->revision_id1 );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_read', $response, 401 );
 		wp_set_current_user( self::$contributor_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_read', $response, 403 );
 	}
@@ -188,5 +188,5 @@
 		wp_set_current_user( self::$editor_id );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/posts/' . REST_TESTS_IMPOSSIBLY_HIGH_NUMBER . '/revisions/' . $this->revision_id1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_post_invalid_parent', $response, 404 );
 	}
@@ -195,5 +195,5 @@
 		wp_set_current_user( self::$editor_id );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$page_id . '/revisions/' . $this->revision_id1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_post_invalid_parent', $response, 404 );
 	}
@@ -203,5 +203,5 @@
 		$request = new WP_REST_Request( 'DELETE', '/wp/v2/posts/' . self::$post_id . '/revisions/' . $this->revision_id1 );
 		$request->set_param( 'force', true );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$this->assertNull( get_post( $this->revision_id1 ) );
@@ -212,9 +212,9 @@
 
 		$request  = new WP_REST_Request( 'DELETE', '/wp/v2/posts/' . self::$post_id . '/revisions/' . $this->revision_id1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_trash_not_supported', $response, 501 );
 
 		$request->set_param( 'force', 'false' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_trash_not_supported', $response, 501 );
 
@@ -226,5 +226,5 @@
 		wp_set_current_user( self::$contributor_id );
 		$request  = new WP_REST_Request( 'DELETE', '/wp/v2/posts/' . self::$post_id . '/revisions/' . $this->revision_id1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_read', $response, 403 );
 	}
@@ -233,5 +233,5 @@
 		wp_set_current_user( self::$editor_id );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$post_id . '/revisions/' . $this->revision_id1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$this->check_get_revision_response( $response, $this->revision_1 );
@@ -240,5 +240,5 @@
 	public function test_get_item_schema() {
 		$request    = new WP_REST_Request( 'OPTIONS', '/wp/v2/posts/' . self::$post_id . '/revisions' );
-		$response   = $this->server->dispatch( $request );
+		$response   = rest_get_server()->dispatch( $request );
 		$data       = $response->get_data();
 		$properties = $data['schema']['properties'];
@@ -260,5 +260,5 @@
 	public function test_create_item() {
 		$request  = new WP_REST_Request( 'POST', '/wp/v2/posts/' . self::$post_id . '/revisions' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_no_route', $response, 404 );
 	}
@@ -266,5 +266,5 @@
 	public function test_update_item() {
 		$request  = new WP_REST_Request( 'POST', '/wp/v2/posts/' . self::$post_id . '/revisions/' . $this->revision_id1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_no_route', $response, 404 );
 	}
@@ -289,5 +289,5 @@
 		$request = new WP_REST_Request( 'OPTIONS', '/wp/v2/posts/' . self::$post_id . '/revisions' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -299,5 +299,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$post_id . '/revisions/' . $this->revision_id1 );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertArrayHasKey( 'my_custom_int', $response->data );
 
@@ -355,5 +355,5 @@
 		wp_set_current_user( self::$editor_id );
 		$request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$post_id . '/revisions/' . $this->revision_id1 );
-		$this->server->dispatch( $request );
+		rest_get_server()->dispatch( $request );
 
 		$post           = get_post();
Index: /trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php
===================================================================
--- /trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php	(revision 42723)
+++ /trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php	(revision 42724)
@@ -21,6 +21,6 @@
 		/** @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 );
 
 		add_filter( 'pre_http_request', array( $this, 'mock_embed_request' ), 10, 3 );
@@ -73,5 +73,5 @@
 
 	public function test_expected_routes_in_schema() {
-		$routes = $this->server->get_routes();
+		$routes = rest_get_server()->get_routes();
 
 		$this->assertTrue( is_array( $routes ), '`get_routes` should return an array.' );
@@ -374,5 +374,5 @@
 				$request->set_query_params( $route['args'] );
 			}
-			$response = $this->server->dispatch( $request );
+			$response = rest_get_server()->dispatch( $request );
 			$status   = $response->get_status();
 			$data     = $response->get_data();
Index: /trunk/tests/phpunit/tests/rest-api/rest-server.php
===================================================================
--- /trunk/tests/phpunit/tests/rest-api/rest-server.php	(revision 42723)
+++ /trunk/tests/phpunit/tests/rest-api/rest-server.php	(revision 42724)
@@ -17,5 +17,5 @@
 		$GLOBALS['wp_rest_server'] = null;
 		add_filter( 'wp_rest_server_class', array( $this, 'filter_wp_rest_server_class' ) );
-		$this->server = rest_get_server();
+		$GLOBALS['wp_rest_server'] = rest_get_server();
 		remove_filter( 'wp_rest_server_class', array( $this, 'filter_wp_rest_server_class' ) );
 	}
@@ -46,5 +46,5 @@
 		$response->header( 'Multiple', 'yes', false );
 
-		$envelope_response = $this->server->envelope_response( $response, false );
+		$envelope_response = rest_get_server()->envelope_response( $response, false );
 
 		// The envelope should still be a response, but with defaults.
@@ -76,5 +76,5 @@
 
 		$request  = new WP_REST_Request( 'GET', '/test-ns/test' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 'bar', $request['foo'] );
@@ -97,5 +97,5 @@
 		$request = new WP_REST_Request( 'GET', '/test-ns/test' );
 		$request->set_query_params( array( 'foo' => 123 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( '123', $request['foo'] );
@@ -115,5 +115,5 @@
 		$request = new WP_REST_Request( 'GET', '/optional/test' );
 		$request->set_query_params( array() );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertInstanceOf( 'WP_REST_Response', $response );
 		$this->assertEquals( 200, $response->get_status() );
@@ -134,5 +134,5 @@
 		);
 		$request = new WP_REST_Request( 'GET', '/no-zero/test' );
-		$this->server->dispatch( $request );
+		rest_get_server()->dispatch( $request );
 		$this->assertEquals( array( 'foo' => 'bar' ), $request->get_params() );
 	}
@@ -146,5 +146,5 @@
 		);
 		$request  = new WP_REST_Request( 'HEAD', '/head-request/test' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 	}
@@ -171,5 +171,5 @@
 		);
 		$request  = new WP_REST_Request( 'HEAD', '/head-request/test' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 	}
@@ -177,5 +177,5 @@
 	public function test_url_params_no_numeric_keys() {
 
-		$this->server->register_route(
+		rest_get_server()->register_route(
 			'test', '/test/(?P<data>.*)', array(
 				array(
@@ -190,5 +190,5 @@
 
 		$request = new WP_REST_Request( 'GET', '/test/some-value' );
-		$this->server->dispatch( $request );
+		rest_get_server()->dispatch( $request );
 		$this->assertEquals( array( 'data' => 'some-value' ), $request->get_params() );
 	}
@@ -209,5 +209,5 @@
 
 		$request = new WP_REST_Request( 'GET', '/test-ns/test', array() );
-		$result  = $this->server->dispatch( $request );
+		$result  = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 403, $result->get_status() );
@@ -234,5 +234,5 @@
 		wp_set_current_user( $editor );
 
-		$result = $this->server->dispatch( $request );
+		$result = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 200, $result->get_status() );
@@ -255,6 +255,6 @@
 		$request = new WP_REST_Request( 'GET', '/test-ns/test', array() );
 
-		$result = $this->server->dispatch( $request );
-		$result = apply_filters( 'rest_post_dispatch', $result, $this->server, $request );
+		$result = rest_get_server()->dispatch( $request );
+		$result = apply_filters( 'rest_post_dispatch', $result, rest_get_server(), $request );
 
 		$this->assertFalse( $result->get_status() !== 200 );
@@ -288,9 +288,9 @@
 		$request = new WP_REST_Request( 'GET', '/test-ns/test', array() );
 
-		$result = $this->server->dispatch( $request );
+		$result = rest_get_server()->dispatch( $request );
 
 		$this->assertFalse( $result->get_status() !== 200 );
 
-		$result = apply_filters( 'rest_post_dispatch', $result, $this->server, $request );
+		$result = apply_filters( 'rest_post_dispatch', $result, rest_get_server(), $request );
 
 		$sent_headers = $result->get_headers();
@@ -323,6 +323,6 @@
 		$request = new WP_REST_Request( 'GET', '/test-ns/test', array() );
 
-		$result = $this->server->dispatch( $request );
-		$result = apply_filters( 'rest_post_dispatch', $result, $this->server, $request );
+		$result = rest_get_server()->dispatch( $request );
+		$result = apply_filters( 'rest_post_dispatch', $result, rest_get_server(), $request );
 
 		$this->assertEquals( $result->get_status(), 403 );
@@ -348,7 +348,7 @@
 
 		$request  = new WP_REST_Request( 'OPTIONS', '/test-ns/test' );
-		$response = $this->server->dispatch( $request );
-
-		$result = apply_filters( 'rest_post_dispatch', rest_ensure_response( $response ), $this->server, $request );
+		$response = rest_get_server()->dispatch( $request );
+
+		$result = apply_filters( 'rest_post_dispatch', rest_ensure_response( $response ), rest_get_server(), $request );
 
 		$headers = $result->get_headers();
@@ -366,5 +366,5 @@
 		$error   = new WP_Error( $code, $message );
 
-		$response = $this->server->error_to_response( $error );
+		$response = rest_get_server()->error_to_response( $error );
 		$this->assertInstanceOf( 'WP_REST_Response', $response );
 
@@ -383,5 +383,5 @@
 		$error   = new WP_Error( $code, $message, array( 'status' => 400 ) );
 
-		$response = $this->server->error_to_response( $error );
+		$response = rest_get_server()->error_to_response( $error );
 		$this->assertInstanceOf( 'WP_REST_Response', $response );
 
@@ -402,5 +402,5 @@
 		$error->add( $code2, $message2, array( 'status' => 403 ) );
 
-		$response = $this->server->error_to_response( $error );
+		$response = rest_get_server()->error_to_response( $error );
 		$this->assertInstanceOf( 'WP_REST_Response', $response );
 
@@ -421,5 +421,5 @@
 		);
 		$expected = wp_json_encode( $data );
-		$response = $this->server->json_error( 'wp-api-test-error', 'Message text' );
+		$response = rest_get_server()->json_error( 'wp-api-test-error', 'Message text' );
 
 		$this->assertEquals( $expected, $response );
@@ -451,5 +451,5 @@
 		$response->add_link( 'alternate', 'http://example.org/', array( 'type' => 'application/xml' ) );
 
-		$data = $this->server->response_to_data( $response, false );
+		$data = rest_get_server()->response_to_data( $response, false );
 		$this->assertArrayHasKey( '_links', $data );
 
@@ -468,5 +468,5 @@
 	public function test_link_embedding() {
 		// Register our testing route.
-		$this->server->register_route(
+		rest_get_server()->register_route(
 			'test', '/test/embeddable', array(
 				'methods'  => 'GET',
@@ -482,5 +482,5 @@
 		$response->add_link( 'alternate', rest_url( '/test/embeddable' ), array( 'embeddable' => true ) );
 
-		$data = $this->server->response_to_data( $response, true );
+		$data = rest_get_server()->response_to_data( $response, true );
 		$this->assertArrayHasKey( '_embedded', $data );
 
@@ -501,5 +501,5 @@
 		$response->add_link( 'https://api.w.org/term', 'http://example.com/' );
 
-		$data  = $this->server->response_to_data( $response, false );
+		$data  = rest_get_server()->response_to_data( $response, false );
 		$links = $data['_links'];
 
@@ -514,5 +514,5 @@
 		add_filter( 'rest_response_link_curies', array( $this, 'add_custom_curie' ) );
 
-		$data  = $this->server->response_to_data( $response, false );
+		$data  = rest_get_server()->response_to_data( $response, false );
 		$links = $data['_links'];
 
@@ -541,5 +541,5 @@
 	public function test_link_embedding_self() {
 		// Register our testing route.
-		$this->server->register_route(
+		rest_get_server()->register_route(
 			'test', '/test/embeddable', array(
 				'methods'  => 'GET',
@@ -552,5 +552,5 @@
 		$response->add_link( 'self', rest_url( '/test/notembeddable' ), array( 'embeddable' => true ) );
 
-		$data = $this->server->response_to_data( $response, true );
+		$data = rest_get_server()->response_to_data( $response, true );
 
 		$this->assertArrayNotHasKey( '_embedded', $data );
@@ -562,5 +562,5 @@
 	public function test_link_embedding_params() {
 		// Register our testing route.
-		$this->server->register_route(
+		rest_get_server()->register_route(
 			'test', '/test/embeddable', array(
 				'methods'  => 'GET',
@@ -574,5 +574,5 @@
 		$response->add_link( 'alternate', $url, array( 'embeddable' => true ) );
 
-		$data = $this->server->response_to_data( $response, true );
+		$data = rest_get_server()->response_to_data( $response, true );
 
 		$this->assertArrayHasKey( '_embedded', $data );
@@ -588,5 +588,5 @@
 	public function test_link_embedding_error() {
 		// Register our testing route.
-		$this->server->register_route(
+		rest_get_server()->register_route(
 			'test', '/test/embeddable', array(
 				'methods'  => 'GET',
@@ -600,5 +600,5 @@
 		$response->add_link( 'up', $url, array( 'embeddable' => true ) );
 
-		$data = $this->server->response_to_data( $response, true );
+		$data = rest_get_server()->response_to_data( $response, true );
 
 		$this->assertArrayHasKey( '_embedded', $data );
@@ -622,5 +622,5 @@
 			'untouched' => 'data',
 		);
-		$result = $this->server->embed_links( $data );
+		$result = rest_get_server()->embed_links( $data );
 
 		$this->assertArrayNotHasKey( '_links', $data );
@@ -651,5 +651,5 @@
 		$response->remove_link( 'self' );
 
-		$data = $this->server->response_to_data( $response, false );
+		$data = rest_get_server()->response_to_data( $response, false );
 		$this->assertArrayHasKey( '_links', $data );
 
@@ -670,5 +670,5 @@
 		$response->remove_link( 'self', 'https://example.com/' );
 
-		$data = $this->server->response_to_data( $response, false );
+		$data = rest_get_server()->response_to_data( $response, false );
 		$this->assertArrayHasKey( '_links', $data );
 
@@ -790,6 +790,6 @@
 		$request = new WP_REST_Request( 'GET', '/', array() );
 
-		$result  = $this->server->serve_request( '/' );
-		$headers = $this->server->sent_headers;
+		$result  = rest_get_server()->serve_request( '/' );
+		$headers = rest_get_server()->sent_headers;
 
 		$this->assertEquals( 'noindex', $headers['X-Robots-Tag'] );
@@ -802,8 +802,8 @@
 	public function test_rest_enable_filter_is_deprecated() {
 		add_filter( 'rest_enabled', '__return_false' );
-		$this->server->serve_request( '/' );
+		rest_get_server()->serve_request( '/' );
 		remove_filter( 'rest_enabled', '__return_false' );
 
-		$result = json_decode( $this->server->sent_body );
+		$result = json_decode( rest_get_server()->sent_body );
 
 		$this->assertObjectNotHasAttribute( 'code', $result );
@@ -815,6 +815,6 @@
 		$request = new WP_REST_Request( 'GET', '/', array() );
 
-		$result  = $this->server->serve_request( '/' );
-		$headers = $this->server->sent_headers;
+		$result  = rest_get_server()->serve_request( '/' );
+		$headers = rest_get_server()->sent_headers;
 
 		$this->assertEquals( '<' . esc_url_raw( $api_root ) . '>; rel="https://api.w.org/"', $headers['Link'] );
@@ -826,6 +826,6 @@
 		wp_set_current_user( $editor );
 
-		$result  = $this->server->serve_request( '/' );
-		$headers = $this->server->sent_headers;
+		$result  = rest_get_server()->serve_request( '/' );
+		$headers = rest_get_server()->sent_headers;
 
 		foreach ( wp_get_nocache_headers() as $header => $value ) {
@@ -846,6 +846,6 @@
 		$request = new WP_REST_Request( 'GET', '/', array() );
 
-		$result  = $this->server->serve_request( '/' );
-		$headers = $this->server->sent_headers;
+		$result  = rest_get_server()->serve_request( '/' );
+		$headers = rest_get_server()->sent_headers;
 
 		foreach ( wp_get_nocache_headers() as $header => $value ) {
@@ -856,5 +856,5 @@
 	public function test_serve_request_url_params_are_unslashed() {
 
-		$this->server->register_route(
+		rest_get_server()->register_route(
 			'test', '/test/(?P<data>.*)', array(
 				array(
@@ -868,6 +868,6 @@
 		);
 
-		$result     = $this->server->serve_request( '/test/data\\with\\slashes' );
-		$url_params = $this->server->last_request->get_url_params();
+		$result     = rest_get_server()->serve_request( '/test/data\\with\\slashes' );
+		$url_params = rest_get_server()->last_request->get_url_params();
 		$this->assertEquals( 'data\\with\\slashes', $url_params['data'] );
 	}
@@ -875,5 +875,5 @@
 	public function test_serve_request_query_params_are_unslashed() {
 
-		$this->server->register_route(
+		rest_get_server()->register_route(
 			'test', '/test', array(
 				array(
@@ -894,6 +894,6 @@
 		);
 
-		$result       = $this->server->serve_request( '/test' );
-		$query_params = $this->server->last_request->get_query_params();
+		$result       = rest_get_server()->serve_request( '/test' );
+		$query_params = rest_get_server()->last_request->get_query_params();
 		$this->assertEquals( 'data\\with\\slashes', $query_params['data'] );
 	}
@@ -901,5 +901,5 @@
 	public function test_serve_request_body_params_are_unslashed() {
 
-		$this->server->register_route(
+		rest_get_server()->register_route(
 			'test', '/test', array(
 				array(
@@ -920,7 +920,7 @@
 		);
 
-		$result = $this->server->serve_request( '/test/data' );
-
-		$body_params = $this->server->last_request->get_body_params();
+		$result = rest_get_server()->serve_request( '/test/data' );
+
+		$body_params = rest_get_server()->last_request->get_body_params();
 		$this->assertEquals( 'data\\with\\slashes', $body_params['data'] );
 	}
@@ -928,5 +928,5 @@
 	public function test_serve_request_json_params_are_unslashed() {
 
-		$this->server->register_route(
+		rest_get_server()->register_route(
 			'test', '/test', array(
 				array(
@@ -947,6 +947,6 @@
 		);
 
-		$result      = $this->server->serve_request( '/test' );
-		$json_params = $this->server->last_request->get_json_params();
+		$result      = rest_get_server()->serve_request( '/test' );
+		$json_params = rest_get_server()->last_request->get_json_params();
 		$this->assertEquals( 'data\\with\\slashes', $json_params['data'] );
 	}
@@ -954,5 +954,5 @@
 	public function test_serve_request_file_params_are_unslashed() {
 
-		$this->server->register_route(
+		rest_get_server()->register_route(
 			'test', '/test', array(
 				array(
@@ -973,6 +973,6 @@
 		);
 
-		$result      = $this->server->serve_request( '/test/data\\with\\slashes' );
-		$file_params = $this->server->last_request->get_file_params();
+		$result      = rest_get_server()->serve_request( '/test/data\\with\\slashes' );
+		$file_params = rest_get_server()->last_request->get_file_params();
 		$this->assertEquals( 'data\\with\\slashes', $file_params['data']['name'] );
 	}
@@ -980,5 +980,5 @@
 	public function test_serve_request_headers_are_unslashed() {
 
-		$this->server->register_route(
+		rest_get_server()->register_route(
 			'test', '/test', array(
 				array(
@@ -995,6 +995,6 @@
 		$_SERVER['HTTP_X_MY_HEADER'] = wp_slash( 'data\\with\\slashes' );
 
-		$result = $this->server->serve_request( '/test/data\\with\\slashes' );
-		$this->assertEquals( 'data\\with\\slashes', $this->server->last_request->get_header( 'x_my_header' ) );
+		$result = rest_get_server()->serve_request( '/test/data\\with\\slashes' );
+		$this->assertEquals( 'data\\with\\slashes', rest_get_server()->last_request->get_header( 'x_my_header' ) );
 	}
 
@@ -1079,5 +1079,5 @@
 			)
 		);
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 200, $response->get_status() );
@@ -1138,7 +1138,7 @@
 	protected function helper_make_request_and_return_headers_for_rest_send_refreshed_nonce_tests() {
 		$request = new WP_REST_Request( 'GET', '/', array() );
-		$result  = $this->server->serve_request( '/' );
-
-		return $this->server->sent_headers;
+		$result  = rest_get_server()->serve_request( '/' );
+
+		return rest_get_server()->sent_headers;
 	}
 }
Index: /trunk/tests/phpunit/tests/rest-api/rest-settings-controller.php
===================================================================
--- /trunk/tests/phpunit/tests/rest-api/rest-settings-controller.php	(revision 42723)
+++ /trunk/tests/phpunit/tests/rest-api/rest-settings-controller.php	(revision 42724)
@@ -40,5 +40,5 @@
 
 	public function test_register_routes() {
-		$routes = $this->server->get_routes();
+		$routes = rest_get_server()->get_routes();
 		$this->assertArrayHasKey( '/wp/v2/settings', $routes );
 	}
@@ -48,5 +48,5 @@
 		wp_set_current_user( self::$administrator );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/settings/title' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 404, $response->get_status() );
 	}
@@ -57,5 +57,5 @@
 	public function test_get_item_is_not_public_not_authenticated() {
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/settings' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 401, $response->get_status() );
 	}
@@ -64,5 +64,5 @@
 		wp_set_current_user( self::$author );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/settings' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 403, $response->get_status() );
 	}
@@ -71,5 +71,5 @@
 		wp_set_current_user( self::$administrator );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/settings' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$actual   = array_keys( $data );
@@ -108,5 +108,5 @@
 		update_option( 'posts_per_page', 'invalid_number' ); // this is cast to (int) 1
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/settings' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -132,5 +132,5 @@
 
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/settings' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -142,5 +142,5 @@
 
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/settings' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'validvalue2', $data['mycustomsettinginrest'] );
@@ -169,5 +169,5 @@
 		update_option( 'mycustomsetting', array( '1', '2' ) );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/settings' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( array( 1, 2 ), $data['mycustomsetting'] );
@@ -176,5 +176,5 @@
 		update_option( 'mycustomsetting', array() );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/settings' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( array(), $data['mycustomsetting'] );
@@ -183,5 +183,5 @@
 		update_option( 'mycustomsetting', array( array( 1 ) ) );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/settings' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( null, $data['mycustomsetting'] );
@@ -190,5 +190,5 @@
 		delete_option( 'mycustomsetting' );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/settings' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( null, $data['mycustomsetting'] );
@@ -217,5 +217,5 @@
 
 		// We have to re-register the route, as the args changes based off registered settings.
-		$this->server->override_by_default = true;
+		rest_get_server()->override_by_default = true;
 		$this->endpoint->register_routes();
 
@@ -223,5 +223,5 @@
 		update_option( 'mycustomsetting', array( 'a' => '1' ) );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/settings' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( array( 'a' => 1 ), $data['mycustomsetting'] );
@@ -230,5 +230,5 @@
 		update_option( 'mycustomsetting', array() );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/settings' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( array(), $data['mycustomsetting'] );
@@ -242,5 +242,5 @@
 		);
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/settings' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( null, $data['mycustomsetting'] );
@@ -284,5 +284,5 @@
 
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/settings' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -318,5 +318,5 @@
 
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/settings' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( null, $data['mycustomsettinginrest'] );
@@ -342,5 +342,5 @@
 
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/settings' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( null, $data['mycustomsettinginrest'] );
@@ -356,5 +356,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/settings' );
 		$request->set_param( 'title', 'The new title!' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -389,5 +389,5 @@
 
 		// We have to re-register the route, as the args changes based off registered settings.
-		$this->server->override_by_default = true;
+		rest_get_server()->override_by_default = true;
 		$this->endpoint->register_routes();
 		wp_set_current_user( self::$administrator );
@@ -395,5 +395,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/settings' );
 		$request->set_param( 'mycustomsetting', array( '1', '2' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( array( 1, 2 ), $data['mycustomsetting'] );
@@ -403,5 +403,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/settings' );
 		$request->set_param( 'mycustomsetting', array() );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( array(), $data['mycustomsetting'] );
@@ -411,5 +411,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/settings' );
 		$request->set_param( 'mycustomsetting', array( 'invalid' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
@@ -440,5 +440,5 @@
 
 		// We have to re-register the route, as the args changes based off registered settings.
-		$this->server->override_by_default = true;
+		rest_get_server()->override_by_default = true;
 		$this->endpoint->register_routes();
 		wp_set_current_user( self::$administrator );
@@ -453,5 +453,5 @@
 			)
 		);
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -475,5 +475,5 @@
 
 		// We have to re-register the route, as the args changes based off registered settings.
-		$this->server->override_by_default = true;
+		rest_get_server()->override_by_default = true;
 		$this->endpoint->register_routes();
 		wp_set_current_user( self::$administrator );
@@ -481,5 +481,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/settings' );
 		$request->set_param( 'mycustomsetting', array( 'a' => 1 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( array( 'a' => 1 ), $data['mycustomsetting'] );
@@ -489,5 +489,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/settings' );
 		$request->set_param( 'mycustomsetting', array() );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( array(), $data['mycustomsetting'] );
@@ -502,5 +502,5 @@
 			)
 		);
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
@@ -509,5 +509,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/settings' );
 		$request->set_param( 'mycustomsetting', array( 'a' => 'invalid' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 		unregister_setting( 'somegroup', 'mycustomsetting' );
@@ -520,5 +520,5 @@
 		$request->set_param( 'title', 'The old title!' );
 		$request->set_param( 'description', 'The old description!' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 200, $response->get_status() );
@@ -533,5 +533,5 @@
 		$request->set_param( 'title', 'The new title!' );
 		$request->set_param( 'description', 'The new description!' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -549,5 +549,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/settings' );
 		$request->set_param( 'title', array( 'rendered' => 'This should fail.' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -557,5 +557,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/settings' );
 		$request->set_param( 'posts_per_page', 11 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 	}
@@ -565,5 +565,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/settings' );
 		$request->set_param( 'posts_per_page', 10.5 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -578,5 +578,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/settings' );
 		$request->set_param( 'posts_per_page', null );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -591,5 +591,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/settings' );
 		$request->set_param( 'default_ping_status', 'open&closed' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -609,5 +609,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/settings' );
 		$request->set_param( 'mycustomsetting', null );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_stored_value', $response, 500 );
@@ -617,5 +617,5 @@
 		/** Settings can't be deleted */
 		$request  = new WP_REST_Request( 'DELETE', '/wp/v2/settings/title' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 404, $response->get_status() );
 	}
Index: /trunk/tests/phpunit/tests/rest-api/rest-tags-controller.php
===================================================================
--- /trunk/tests/phpunit/tests/rest-api/rest-tags-controller.php	(revision 42723)
+++ /trunk/tests/phpunit/tests/rest-api/rest-tags-controller.php	(revision 42724)
@@ -51,5 +51,5 @@
 
 	public function test_register_routes() {
-		$routes = $this->server->get_routes();
+		$routes = rest_get_server()->get_routes();
 		$this->assertArrayHasKey( '/wp/v2/tags', $routes );
 		$this->assertArrayHasKey( '/wp/v2/tags/(?P<id>[\d]+)', $routes );
@@ -59,5 +59,5 @@
 		// Collection
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/tags' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -66,5 +66,5 @@
 		$tag1     = $this->factory->tag->create( array( 'name' => 'Season 5' ) );
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/tags/' . $tag1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -74,5 +74,5 @@
 	public function test_registered_query_params() {
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/tags' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$keys     = array_keys( $data['endpoints'][0]['args'] );
@@ -99,5 +99,5 @@
 		$this->factory->tag->create();
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/tags' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_get_taxonomy_terms_response( $response );
 	}
@@ -107,5 +107,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/tags' );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_forbidden_context', $response, 401 );
 	}
@@ -118,5 +118,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/tags' );
 		$request->set_param( 'hide_empty', true );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 2, count( $data ) );
@@ -125,5 +125,5 @@
 		// invalid value should fail
 		$request->set_param( 'hide_empty', 'nothanks' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -136,5 +136,5 @@
 		// Orderby=>asc
 		$request->set_param( 'include', array( $id3, $id1 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 2, count( $data ) );
@@ -142,5 +142,5 @@
 		// Orderby=>include
 		$request->set_param( 'orderby', 'include' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 2, count( $data ) );
@@ -148,5 +148,5 @@
 		// Include invalid value shoud fail
 		$request->set_param( 'include', array( 'myterm' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -156,10 +156,10 @@
 		$id2      = $this->factory->tag->create();
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/tags' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertTrue( in_array( $id1, wp_list_pluck( $data, 'id' ), true ) );
 		$this->assertTrue( in_array( $id2, wp_list_pluck( $data, 'id' ), true ) );
 		$request->set_param( 'exclude', array( $id2 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertTrue( in_array( $id1, wp_list_pluck( $data, 'id' ), true ) );
@@ -167,5 +167,5 @@
 		// Invalid exclude value should fail
 		$request->set_param( 'exclude', array( 'invalid' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -178,17 +178,17 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/tags' );
 		$request->set_param( 'offset', 1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 3, $response->get_data() );
 		// 'offset' works with 'per_page'
 		$request->set_param( 'per_page', 2 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 2, $response->get_data() );
 		// 'offset' takes priority over 'page'
 		$request->set_param( 'page', 3 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 2, $response->get_data() );
 		// 'offset' invalid value shoudl fail
 		$request->set_param( 'offset', 'moreplease' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -208,5 +208,5 @@
 		$request->set_param( 'order', 'desc' );
 		$request->set_param( 'per_page', 1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -217,5 +217,5 @@
 		$request->set_param( 'order', 'asc' );
 		$request->set_param( 'per_page', 2 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -224,5 +224,5 @@
 		// Invalid orderby should fail.
 		$request->set_param( 'orderby', 'invalid' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -234,5 +234,5 @@
 		// defaults to orderby=name, order=asc
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/tags' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -243,5 +243,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/tags' );
 		$request->set_param( 'orderby', 'id' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -253,5 +253,5 @@
 		$request->set_param( 'orderby', 'id' );
 		$request->set_param( 'order', 'desc' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 200, $response->get_status() );
@@ -269,5 +269,5 @@
 		$request->set_param( 'orderby', 'include_slugs' );
 		$request->set_param( 'slug', array( 'taco', 'burrito', 'chalupa' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 200, $response->get_status() );
@@ -286,5 +286,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/tags' );
 		$request->set_param( 'post', $post_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -296,5 +296,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/tags' );
 		$request->set_param( 'post', 'invalid-post' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -318,5 +318,5 @@
 		$request->set_param( 'per_page', 15 );
 		$request->set_param( 'orderby', 'id' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$tags     = $response->get_data();
 
@@ -332,5 +332,5 @@
 		$request->set_param( 'per_page', 15 );
 		$request->set_param( 'orderby', 'id' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$tags     = $response->get_data();
 
@@ -346,5 +346,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/tags' );
 		$request->set_param( 'post', $post_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -380,5 +380,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/batman' );
 		$request->set_param( 'post', $post_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -397,5 +397,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/tags' );
 		$request->set_param( 'search', 'App' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -404,5 +404,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/tags' );
 		$request->set_param( 'search', 'Garbage' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -415,5 +415,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/tags' );
 		$request->set_param( 'slug', 'apple' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -435,5 +435,5 @@
 			)
 		);
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data  = $response->get_data();
@@ -450,5 +450,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/tags' );
 		$request->set_param( 'slug', 'taco,burrito, enchilada' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data  = $response->get_data();
@@ -474,5 +474,5 @@
 
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/terms/robin' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_no_route', $response, 404 );
 	}
@@ -488,5 +488,5 @@
 		}
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/tags' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 50, $headers['X-WP-Total'] );
@@ -507,5 +507,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/tags' );
 		$request->set_param( 'page', 3 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 51, $headers['X-WP-Total'] );
@@ -526,5 +526,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/tags' );
 		$request->set_param( 'page', 6 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 51, $headers['X-WP-Total'] );
@@ -540,5 +540,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/tags' );
 		$request->set_param( 'page', 8 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 51, $headers['X-WP-Total'] );
@@ -556,5 +556,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/tags' );
 		$request->set_param( 'context', 'banana' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -563,5 +563,5 @@
 		$id       = $this->factory->tag->create();
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/tags/' . $id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_get_taxonomy_term_response( $response, $id );
 	}
@@ -569,5 +569,5 @@
 	public function test_get_term_invalid_term() {
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/tags/' . REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_term_invalid', $response, 404 );
 	}
@@ -578,5 +578,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/tags/' . $id );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_forbidden_context', $response, 401 );
 	}
@@ -592,5 +592,5 @@
 
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/terms/robin/' . $term1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_no_route', $response, 404 );
 	}
@@ -605,5 +605,5 @@
 		);
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/tags/' . $term1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_term_invalid', $response, 404 );
 	}
@@ -615,5 +615,5 @@
 		$request->set_param( 'description', 'This term is so awesome.' );
 		$request->set_param( 'slug', 'so-awesome' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 201, $response->get_status() );
 		$headers = $response->get_headers();
@@ -629,5 +629,5 @@
 		$request = new WP_REST_Request( 'POST', '/wp/v2/tags' );
 		$request->set_param( 'name', 'Incorrect permissions' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_create', $response, 403 );
 	}
@@ -636,5 +636,5 @@
 		wp_set_current_user( self::$administrator );
 		$request  = new WP_REST_Request( 'POST', '/wp/v2/tags' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_missing_callback_param', $response, 400 );
 	}
@@ -646,5 +646,5 @@
 		$request->set_param( 'name', 'My Awesome Term' );
 		$request->set_param( 'parent', REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_taxonomy_not_hierarchical', $response, 400 );
 	}
@@ -662,5 +662,5 @@
 		$request->set_param( 'description', 'New Description' );
 		$request->set_param( 'slug', 'new-slug' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -676,5 +676,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/tags/' . $term->term_id );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$request->set_param( 'slug', $term->slug );
@@ -682,8 +682,8 @@
 		// Run twice to make sure that the update still succeeds even if no DB
 		// rows are updated.
-		$response = $this->server->dispatch( $request );
-		$this->assertEquals( 200, $response->get_status() );
-
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
+		$this->assertEquals( 200, $response->get_status() );
+
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 	}
@@ -693,5 +693,5 @@
 		$request = new WP_REST_Request( 'POST', '/wp/v2/tags/' . REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
 		$request->set_param( 'name', 'Invalid Term' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_term_invalid', $response, 404 );
 	}
@@ -702,5 +702,5 @@
 		$request = new WP_REST_Request( 'POST', '/wp/v2/tags/' . $term->term_id );
 		$request->set_param( 'name', 'Incorrect permissions' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_update', $response, 403 );
 	}
@@ -716,5 +716,5 @@
 
 		add_filter( 'map_meta_cap', array( $this, 'grant_edit_term' ), 10, 2 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		remove_filter( 'user_has_cap', array( $this, 'grant_edit_term' ), 10, 2 );
 
@@ -741,5 +741,5 @@
 
 		add_filter( 'map_meta_cap', array( $this, 'revoke_edit_term' ), 10, 2 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		remove_filter( 'user_has_cap', array( $this, 'revoke_edit_term' ), 10, 2 );
 
@@ -760,5 +760,5 @@
 		$request = new WP_REST_Request( 'POST', '/wp/v2/tags/' . $term->term_id );
 		$request->set_param( 'parent', REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_taxonomy_not_hierarchical', $response, 400 );
 	}
@@ -770,5 +770,5 @@
 			$request->set_param( $name, $value );
 		}
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 201, $response->get_status() );
 		$actual_output = $response->get_data();
@@ -788,5 +788,5 @@
 			$request->set_param( $name, $value );
 		}
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$actual_output = $response->get_data();
@@ -876,5 +876,5 @@
 		$request = new WP_REST_Request( 'DELETE', '/wp/v2/tags/' . $term->term_id );
 		$request->set_param( 'force', true );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -888,9 +888,9 @@
 
 		$request  = new WP_REST_Request( 'DELETE', '/wp/v2/tags/' . $term->term_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_trash_not_supported', $response, 501 );
 
 		$request->set_param( 'force', 'false' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_trash_not_supported', $response, 501 );
 	}
@@ -899,5 +899,5 @@
 		wp_set_current_user( self::$administrator );
 		$request  = new WP_REST_Request( 'DELETE', '/wp/v2/tags/' . REST_TESTS_IMPOSSIBLY_HIGH_NUMBER );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_term_invalid', $response, 404 );
 	}
@@ -907,5 +907,5 @@
 		$term     = get_term_by( 'id', $this->factory->tag->create(), 'post_tag' );
 		$request  = new WP_REST_Request( 'DELETE', '/wp/v2/tags/' . $term->term_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_delete', $response, 403 );
 	}
@@ -921,5 +921,5 @@
 
 		add_filter( 'map_meta_cap', array( $this, 'grant_delete_term' ), 10, 2 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		remove_filter( 'map_meta_cap', array( $this, 'grant_delete_term' ), 10, 2 );
 
@@ -947,5 +947,5 @@
 
 		add_filter( 'map_meta_cap', array( $this, 'revoke_delete_term' ), 10, 2 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		remove_filter( 'map_meta_cap', array( $this, 'revoke_delete_term' ), 10, 2 );
 
@@ -963,5 +963,5 @@
 		$term     = get_term_by( 'id', $this->factory->tag->create(), 'post_tag' );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/tags/' . $term->term_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -971,5 +971,5 @@
 	public function test_get_item_schema() {
 		$request    = new WP_REST_Request( 'OPTIONS', '/wp/v2/tags' );
-		$response   = $this->server->dispatch( $request );
+		$response   = rest_get_server()->dispatch( $request );
 		$data       = $response->get_data();
 		$properties = $data['schema']['properties'];
@@ -988,5 +988,5 @@
 	public function test_get_item_schema_non_hierarchical() {
 		$request    = new WP_REST_Request( 'OPTIONS', '/wp/v2/tags' );
-		$response   = $this->server->dispatch( $request );
+		$response   = rest_get_server()->dispatch( $request );
 		$data       = $response->get_data();
 		$properties = $data['schema']['properties'];
@@ -1013,5 +1013,5 @@
 		$request = new WP_REST_Request( 'OPTIONS', '/wp/v2/tags' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertArrayHasKey( 'my_custom_int', $data['schema']['properties'] );
@@ -1021,5 +1021,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/tags/' . $tag_id );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertArrayHasKey( 'my_custom_int', $response->data );
 
@@ -1054,5 +1054,5 @@
 		);
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
@@ -1074,5 +1074,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/tags' );
 		$request->set_param( 'post', $p );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$found_1  = wp_list_pluck( $response->data, 'id' );
 
@@ -1083,5 +1083,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/tags' );
 		$request->set_param( 'post', $p );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$found_2  = wp_list_pluck( $response->data, 'id' );
 
Index: /trunk/tests/phpunit/tests/rest-api/rest-taxonomies-controller.php
===================================================================
--- /trunk/tests/phpunit/tests/rest-api/rest-taxonomies-controller.php	(revision 42723)
+++ /trunk/tests/phpunit/tests/rest-api/rest-taxonomies-controller.php	(revision 42724)
@@ -27,5 +27,5 @@
 
 	public function test_register_routes() {
-		$routes = $this->server->get_routes();
+		$routes = rest_get_server()->get_routes();
 
 		$this->assertArrayHasKey( '/wp/v2/taxonomies', $routes );
@@ -36,5 +36,5 @@
 		// Collection
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/taxonomies' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -42,5 +42,5 @@
 		// Single
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/taxonomies/post_tag' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -50,5 +50,5 @@
 	public function test_get_items() {
 		$request    = new WP_REST_Request( 'GET', '/wp/v2/taxonomies' );
-		$response   = $this->server->dispatch( $request );
+		$response   = rest_get_server()->dispatch( $request );
 		$data       = $response->get_data();
 		$taxonomies = $this->get_public_taxonomies( get_taxonomies( '', 'objects' ) );
@@ -67,5 +67,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/taxonomies' );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_view', $response, 401 );
 	}
@@ -74,5 +74,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/taxonomies' );
 		$request->set_param( 'type', 'post' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_taxonomies_for_type_response( 'post', $response );
 	}
@@ -81,5 +81,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/taxonomies' );
 		$request->set_param( 'type', 'wingding' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
@@ -89,5 +89,5 @@
 	public function test_get_item() {
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/taxonomies/category' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_taxonomy_object_response( 'view', $response );
 	}
@@ -98,5 +98,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/taxonomies/category' );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_taxonomy_object_response( 'edit', $response );
 	}
@@ -106,5 +106,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/taxonomies/category' );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_forbidden_context', $response, 401 );
 	}
@@ -112,5 +112,5 @@
 	public function test_get_invalid_taxonomy() {
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/taxonomies/invalid' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_taxonomy_invalid', $response, 404 );
 	}
@@ -120,5 +120,5 @@
 
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/taxonomies/api-private' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_forbidden', $response, 401 );
 	}
@@ -129,5 +129,5 @@
 
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/taxonomies/api-private' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_forbidden', $response, 403 );
 	}
@@ -136,5 +136,5 @@
 		/** Taxonomies can't be created */
 		$request  = new WP_REST_Request( 'POST', '/wp/v2/taxonomies' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 404, $response->get_status() );
 	}
@@ -143,5 +143,5 @@
 		/** Taxonomies can't be updated */
 		$request  = new WP_REST_Request( 'POST', '/wp/v2/taxonomies/category' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 404, $response->get_status() );
 	}
@@ -150,5 +150,5 @@
 		/** Taxonomies can't be deleted */
 		$request  = new WP_REST_Request( 'DELETE', '/wp/v2/taxonomies/category' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 404, $response->get_status() );
 	}
@@ -165,5 +165,5 @@
 	public function test_get_item_schema() {
 		$request    = new WP_REST_Request( 'OPTIONS', '/wp/v2/taxonomies' );
-		$response   = $this->server->dispatch( $request );
+		$response   = rest_get_server()->dispatch( $request );
 		$data       = $response->get_data();
 		$properties = $data['schema']['properties'];
Index: /trunk/tests/phpunit/tests/rest-api/rest-users-controller.php
===================================================================
--- /trunk/tests/phpunit/tests/rest-api/rest-users-controller.php	(revision 42723)
+++ /trunk/tests/phpunit/tests/rest-api/rest-users-controller.php	(revision 42724)
@@ -124,5 +124,5 @@
 
 	public function test_register_routes() {
-		$routes = $this->server->get_routes();
+		$routes = rest_get_server()->get_routes();
 
 		$this->assertArrayHasKey( '/wp/v2/users', $routes );
@@ -136,5 +136,5 @@
 		// Collection
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/users' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -142,5 +142,5 @@
 		// Single
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/users/' . self::$user );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] );
@@ -150,5 +150,5 @@
 	public function test_registered_query_params() {
 		$request  = new WP_REST_Request( 'OPTIONS', '/wp/v2/users' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$keys     = array_keys( $data['endpoints'][0]['args'] );
@@ -176,5 +176,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users' );
 		$request->set_param( 'context', 'view' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 200, $response->get_status() );
@@ -191,5 +191,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users' );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 200, $response->get_status() );
@@ -205,5 +205,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users' );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 401, $response->get_status() );
@@ -213,5 +213,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users' );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 403, $response->get_status() );
@@ -220,5 +220,5 @@
 	public function test_get_items_unauthenticated_includes_authors_of_post_types_shown_in_rest() {
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/users' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$users    = $response->get_data();
 
@@ -251,5 +251,5 @@
 	public function test_get_items_unauthenticated_does_not_include_authors_of_post_types_not_shown_in_rest() {
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/users' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$users    = $response->get_data();
 		$user_ids = wp_list_pluck( $users, 'id' );
@@ -261,5 +261,5 @@
 	public function test_get_items_unauthenticated_does_not_include_users_without_published_posts() {
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/users' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$users    = $response->get_data();
 		$user_ids = wp_list_pluck( $users, 'id' );
@@ -279,5 +279,5 @@
 		}
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/users' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 53, $headers['X-WP-Total'] );
@@ -298,5 +298,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users' );
 		$request->set_param( 'page', 3 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 54, $headers['X-WP-Total'] );
@@ -317,5 +317,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users' );
 		$request->set_param( 'page', 6 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 54, $headers['X-WP-Total'] );
@@ -331,5 +331,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users' );
 		$request->set_param( 'page', 8 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$headers  = $response->get_headers();
 		$this->assertEquals( 54, $headers['X-WP-Total'] );
@@ -350,9 +350,9 @@
 		}
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/users' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 10, count( $response->get_data() ) );
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users' );
 		$request->set_param( 'per_page', 5 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 5, count( $response->get_data() ) );
 	}
@@ -366,5 +366,5 @@
 		$request->set_param( 'per_page', 5 );
 		$request->set_param( 'page', 2 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 5, count( $response->get_data() ) );
 		$prev_link = add_query_arg(
@@ -387,5 +387,5 @@
 		$request->set_param( 'order', 'desc' );
 		$request->set_param( 'per_page', 1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( $high_id, $data[0]['id'] );
@@ -394,5 +394,5 @@
 		$request->set_param( 'order', 'asc' );
 		$request->set_param( 'per_page', 1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( $low_id, $data[0]['id'] );
@@ -410,5 +410,5 @@
 		$request->set_param( 'per_page', 1 );
 		$request->set_param( 'include', array( $low_id, $high_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -420,5 +420,5 @@
 		$request->set_param( 'per_page', 1 );
 		$request->set_param( 'include', array( $low_id, $high_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( $low_id, $data[0]['id'] );
@@ -436,5 +436,5 @@
 		$request->set_param( 'per_page', 1 );
 		$request->set_param( 'include', array( $low_id, $high_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -446,5 +446,5 @@
 		$request->set_param( 'per_page', 1 );
 		$request->set_param( 'include', array( $low_id, $high_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( $low_id, $data[0]['id'] );
@@ -461,5 +461,5 @@
 		$request->set_param( 'orderby', 'include_slugs' );
 		$request->set_param( 'slug', array( 'taco', 'burrito', 'chalupa' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -480,5 +480,5 @@
 		$request->set_param( 'per_page', 1 );
 		$request->set_param( 'include', array( $low_id, $high_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( $high_id, $data[0]['id'] );
@@ -489,5 +489,5 @@
 		$request->set_param( 'per_page', 1 );
 		$request->set_param( 'include', array( $low_id, $high_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( $low_id, $data[0]['id'] );
@@ -498,5 +498,5 @@
 		$request->set_param( 'orderby', 'email' );
 		$request->set_param( 'order', 'desc' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_forbidden_orderby', $response, 401 );
 	}
@@ -506,5 +506,5 @@
 		$request->set_param( 'orderby', 'registered_date' );
 		$request->set_param( 'order', 'desc' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_forbidden_orderby', $response, 401 );
 	}
@@ -513,5 +513,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users' );
 		$request->set_param( 'order', 'asc,id' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -520,5 +520,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users' );
 		$request->set_param( 'orderby', 'invalid' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -530,17 +530,17 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users' );
 		$request->set_param( 'offset', 1 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 9, $response->get_data() );
 		// 'offset' works with 'per_page'
 		$request->set_param( 'per_page', 2 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 2, $response->get_data() );
 		// 'offset' takes priority over 'page'
 		$request->set_param( 'page', 3 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertCount( 2, $response->get_data() );
 		// 'offset' invalid value should error
 		$request->set_param( 'offset', 'moreplease' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -554,5 +554,5 @@
 		// Orderby=>asc
 		$request->set_param( 'include', array( $id3, $id1 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 2, count( $data ) );
@@ -560,5 +560,5 @@
 		// Orderby=>include
 		$request->set_param( 'orderby', 'include' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 2, count( $data ) );
@@ -566,10 +566,10 @@
 		// Invalid include should fail
 		$request->set_param( 'include', 'invalid' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 		// No privileges
 		$request->set_param( 'include', array( $id3, $id1 ) );
 		wp_set_current_user( 0 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 0, count( $data ) );
@@ -583,10 +583,10 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users' );
 		$request->set_param( 'per_page', 20 ); // there are >10 users at this point
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertTrue( in_array( $id1, wp_list_pluck( $data, 'id' ), true ) );
 		$this->assertTrue( in_array( $id2, wp_list_pluck( $data, 'id' ), true ) );
 		$request->set_param( 'exclude', array( $id2 ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertTrue( in_array( $id1, wp_list_pluck( $data, 'id' ), true ) );
@@ -594,5 +594,5 @@
 		// Invalid exlude value should error.
 		$request->set_param( 'exclude', 'none-of-those-please' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -602,10 +602,10 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users' );
 		$request->set_param( 'search', 'yololololo' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 0, count( $response->get_data() ) );
 		$yolo_id = $this->factory->user->create( array( 'display_name' => 'yololololo' ) );
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users' );
 		$request->set_param( 'search', 'yololololo' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 1, count( $response->get_data() ) );
 		// default to wildcard search
@@ -618,5 +618,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users' );
 		$request->set_param( 'search', 'ada' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 1, count( $data ) );
@@ -640,5 +640,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users' );
 		$request->set_param( 'slug', 'foo' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 1, count( $data ) );
@@ -682,5 +682,5 @@
 		$request->set_param( 'orderby', 'slug' );
 		$request->set_param( 'order', 'asc' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data  = $response->get_data();
@@ -719,5 +719,5 @@
 		$request->set_param( 'orderby', 'slug' );
 		$request->set_param( 'order', 'desc' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$data  = $response->get_data();
@@ -743,5 +743,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users' );
 		$request->set_param( 'roles', 'author,subscriber' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 2, count( $data ) );
@@ -749,5 +749,5 @@
 		$this->assertEquals( $yolo, $data[1]['id'] );
 		$request->set_param( 'roles', 'author' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 1, count( $data ) );
@@ -755,9 +755,9 @@
 		wp_set_current_user( 0 );
 		$request->set_param( 'roles', 'author' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_user_cannot_view', $response, 401 );
 		wp_set_current_user( self::$editor );
 		$request->set_param( 'roles', 'author' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_user_cannot_view', $response, 403 );
 	}
@@ -773,5 +773,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users' );
 		$request->set_param( 'roles', 'ilovesteak,author' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 1, count( $data ) );
@@ -779,5 +779,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users' );
 		$request->set_param( 'roles', 'steakisgood' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 0, count( $data ) );
@@ -791,5 +791,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/users/%d', $user_id ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_get_user_response( $response, 'embed' );
 	}
@@ -809,5 +809,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/users/%d', self::$editor ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$data = $response->get_data();
@@ -827,5 +827,5 @@
 		wp_set_current_user( self::$user );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/users/100' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_user_invalid_id', $response, 404 );
@@ -846,5 +846,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users/' . $lolz );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		if ( is_multisite() ) {
@@ -861,5 +861,5 @@
 		wp_set_current_user( self::$editor );
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/users/%d', self::$user ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_user_cannot_view', $response, 403 );
 	}
@@ -867,5 +867,5 @@
 	public function test_can_get_item_author_of_rest_true_public_true_unauthenticated() {
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/users/%d', self::$authors['r_true_p_true'] ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 	}
@@ -874,5 +874,5 @@
 		wp_set_current_user( self::$editor );
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/users/%d', self::$authors['r_true_p_true'] ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 	}
@@ -880,5 +880,5 @@
 	public function test_can_get_item_author_of_rest_true_public_false() {
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/users/%d', self::$authors['r_true_p_false'] ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 	}
@@ -886,5 +886,5 @@
 	public function test_cannot_get_item_author_of_rest_false_public_true_unauthenticated() {
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/users/%d', self::$authors['r_false_p_true'] ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_user_cannot_view', $response, 401 );
 	}
@@ -893,5 +893,5 @@
 		wp_set_current_user( self::$editor );
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/users/%d', self::$authors['r_false_p_true'] ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_user_cannot_view', $response, 403 );
 	}
@@ -899,5 +899,5 @@
 	public function test_cannot_get_item_author_of_rest_false_public_false() {
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/users/%d', self::$authors['r_false_p_false'] ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_user_cannot_view', $response, 401 );
 	}
@@ -905,5 +905,5 @@
 	public function test_can_get_item_author_of_post() {
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/users/%d', self::$editor ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 	}
@@ -911,5 +911,5 @@
 	public function test_cannot_get_item_author_of_draft() {
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/users/%d', self::$draft_editor ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_user_cannot_view', $response, 401 );
 	}
@@ -928,5 +928,5 @@
 		wp_set_current_user( 0 );
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/users/%d', $this->author_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_get_user_response( $response, 'embed' );
 	}
@@ -940,5 +940,5 @@
 		wp_set_current_user( 0 );
 		$request  = new WP_REST_Request( 'GET', sprintf( '/wp/v2/users/%d', $this->author_id ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 401, $response->get_status() );
 		$this->post_id = $this->factory->post->create(
@@ -948,5 +948,5 @@
 			)
 		);
-		$response      = $this->server->dispatch( $request );
+		$response      = rest_get_server()->dispatch( $request );
 		$this->check_get_user_response( $response, 'embed' );
 	}
@@ -959,5 +959,5 @@
 		$request->set_param( 'context', 'edit' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_get_user_response( $response, 'edit' );
 	}
@@ -977,5 +977,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/users/%d', $this->author_id ) );
 		$request->set_param( 'context', 'edit' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_user_cannot_view', $response, 401 );
 	}
@@ -986,5 +986,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users/me' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$this->check_get_user_response( $response, 'view' );
@@ -1000,5 +1000,5 @@
 		wp_set_current_user( 0 );
 		$request  = new WP_REST_Request( 'GET', '/wp/v2/users/me' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_not_logged_in', $response, 401 );
@@ -1025,5 +1025,5 @@
 		$request->set_body_params( $params );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$this->assertEquals( 'http://example.com', $data['url'] );
@@ -1057,5 +1057,5 @@
 		$request->set_body_params( $params );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 
@@ -1101,5 +1101,5 @@
 		$request->set_body_params( $params );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		remove_filter( 'illegal_user_logins', array( $this, 'get_illegal_user_logins' ) );
@@ -1131,5 +1131,5 @@
 		$request->add_header( 'content-type', 'application/x-www-form-urlencoded' );
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$user_id  = $data['id'];
@@ -1162,5 +1162,5 @@
 		$request->add_header( 'content-type', 'application/x-www-form-urlencoded' );
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'user_cannot_be_added', $response );
 	}
@@ -1185,5 +1185,5 @@
 		$request->add_header( 'content-type', 'application/x-www-form-urlencoded' );
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$user_id  = $data['id'];
@@ -1215,5 +1215,5 @@
 		$request->add_header( 'content-type', 'application/x-www-form-urlencoded' );
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$user_id  = $data['id'];
@@ -1224,5 +1224,5 @@
 		$request->add_header( 'content-type', 'application/x-www-form-urlencoded' );
 		$request->set_body_params( $params );
-		$switched_response = $this->server->dispatch( $request );
+		$switched_response = rest_get_server()->dispatch( $request );
 
 		restore_current_blog();
@@ -1260,5 +1260,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_add_edit_user_response( $response );
 	}
@@ -1276,5 +1276,5 @@
 		$request->add_header( 'content-type', 'application/x-www-form-urlencoded' );
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_cannot_create_user', $response, 403 );
@@ -1295,5 +1295,5 @@
 		$request->add_header( 'content-type', 'application/x-www-form-urlencoded' );
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_user_exists', $response, 400 );
@@ -1313,5 +1313,5 @@
 		$request->add_header( 'content-type', 'application/x-www-form-urlencoded' );
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
@@ -1332,5 +1332,5 @@
 		$request->add_header( 'content-type', 'application/x-www-form-urlencoded' );
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_user_invalid_role', $response, 400 );
@@ -1364,5 +1364,5 @@
 		$request->set_body_params( $_POST );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_add_edit_user_response( $response, true );
 
@@ -1392,8 +1392,8 @@
 		// Run twice to make sure that the update still succeeds even if no DB
 		// rows are updated.
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 	}
@@ -1417,5 +1417,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/users/' . $user2 );
 		$request->set_param( 'email', 'testjson@example.com' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertInstanceOf( 'WP_Error', $response->as_error() );
 		$this->assertEquals( 'rest_user_invalid_email', $response->as_error()->get_error_code() );
@@ -1434,5 +1434,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/users/' . $user1 );
 		$request->set_param( 'locale', 'klingon' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertInstanceOf( 'WP_Error', $response->as_error() );
 		$this->assertEquals( 'rest_invalid_param', $response->as_error()->get_error_code() );
@@ -1451,5 +1451,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/users/' . $user_id );
 		$request->set_param( 'locale', 'en_US' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_add_edit_user_response( $response, true );
 
@@ -1474,5 +1474,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/users/' . $user_id );
 		$request->set_param( 'locale', '' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_add_edit_user_response( $response, true );
 
@@ -1501,5 +1501,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/users/' . $user2 );
 		$request->set_param( 'username', 'test_json_user' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertInstanceOf( 'WP_Error', $response->as_error() );
 		$this->assertEquals( 'rest_user_invalid_argument', $response->as_error()->get_error_code() );
@@ -1524,5 +1524,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/users/' . $user2 );
 		$request->set_param( 'slug', 'test_json_user' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertInstanceOf( 'WP_Error', $response->as_error() );
 		$this->assertEquals( 'rest_user_invalid_slug', $response->as_error()->get_error_code() );
@@ -1556,5 +1556,5 @@
 		$request->set_body( wp_json_encode( $params ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->check_add_edit_user_response( $response, true );
 
@@ -1580,5 +1580,5 @@
 		$request = new WP_REST_Request( 'PUT', sprintf( '/wp/v2/users/%d', $user_id ) );
 		$request->set_param( 'roles', array( 'editor' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$new_data = $response->get_data();
@@ -1600,5 +1600,5 @@
 		$request = new WP_REST_Request( 'PUT', sprintf( '/wp/v2/users/%d', $user_id ) );
 		$request->set_param( 'roles', 'author,editor' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$new_data = $response->get_data();
@@ -1617,5 +1617,5 @@
 		$request = new WP_REST_Request( 'PUT', sprintf( '/wp/v2/users/%d', self::$editor ) );
 		$request->set_param( 'roles', array( 'administrator' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_cannot_edit_roles', $response, 403 );
@@ -1626,5 +1626,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/users/me' );
 		$request->set_param( 'roles', array( 'administrator' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_cannot_edit_roles', $response, 403 );
@@ -1644,5 +1644,5 @@
 		$request = new WP_REST_Request( 'PUT', sprintf( '/wp/v2/users/%d', $user_id ) );
 		$request->set_param( 'roles', array( 'editor' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_user_invalid_role', $response, 403 );
@@ -1654,5 +1654,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/users/me' );
 		$request->set_param( 'roles', array( 'editor' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_user_invalid_role', $response, 403 );
@@ -1675,5 +1675,5 @@
 		$request = new WP_REST_Request( 'PUT', sprintf( '/wp/v2/users/%d', $user_id ) );
 		$request->set_param( 'roles', array( 'editor' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$new_data = $response->get_data();
@@ -1689,5 +1689,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/users/me' );
 		$request->set_param( 'roles', array( 'editor' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$new_data = $response->get_data();
@@ -1703,5 +1703,5 @@
 		$request = new WP_REST_Request( 'PUT', sprintf( '/wp/v2/users/%d', self::$editor ) );
 		$request->set_param( 'roles', array( 'BeSharp' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_user_invalid_role', $response, 400 );
@@ -1713,5 +1713,5 @@
 		$request = new WP_REST_Request( 'PUT', '/wp/v2/users/me' );
 		$request->set_param( 'roles', array( 'BeSharp' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_user_invalid_role', $response, 400 );
@@ -1734,5 +1734,5 @@
 		$request->add_header( 'content-type', 'application/x-www-form-urlencoded' );
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_cannot_edit', $response, 403 );
@@ -1741,5 +1741,5 @@
 		$request->add_header( 'content-type', 'application/x-www-form-urlencoded' );
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_user_invalid_argument', $response, 400 );
@@ -1760,5 +1760,5 @@
 		$request->add_header( 'content-type', 'application/x-www-form-urlencoded' );
 		$request->set_body_params( $params );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_user_invalid_id', $response, 404 );
@@ -1778,5 +1778,5 @@
 		$request = new WP_REST_Request( 'PUT', sprintf( '/wp/v2/users/%d', $user_id ) );
 		$request->set_param( 'roles', array( 'editor' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_cannot_edit_roles', $response, 403 );
 	}
@@ -1795,5 +1795,5 @@
 		$request = new WP_REST_Request( 'PUT', sprintf( '/wp/v2/users/%d', $user_id ) );
 		$request->set_param( 'roles', array( 'editor' ) );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 
@@ -1816,5 +1816,5 @@
 		$request->set_param( 'roles', array( 'editor' ) );
 		$request->set_param( 'name', 'Short-Lived User' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		if ( is_multisite() ) {
@@ -1840,9 +1840,9 @@
 
 		$request->set_param( 'password', 'no\\backslashes\\allowed' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 
 		$request->set_param( 'password', '' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
 	}
@@ -1859,5 +1859,5 @@
 			}
 			$request->set_param( 'email', 'cbg@androidsdungeon.com' );
-			$response = $this->server->dispatch( $request );
+			$response = rest_get_server()->dispatch( $request );
 			$this->assertEquals( 201, $response->get_status() );
 			$actual_output = $response->get_data();
@@ -1893,5 +1893,5 @@
 			}
 		}
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 200, $response->get_status() );
 		$actual_output = $response->get_data();
@@ -2060,5 +2060,5 @@
 		$request->set_param( 'force', true );
 		$request->set_param( 'reassign', false );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		// Not implemented in multisite.
@@ -2084,5 +2084,5 @@
 		$request = new WP_REST_Request( 'DELETE', sprintf( '/wp/v2/users/%d', $user_id ) );
 		$request->set_param( 'reassign', false );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		// Not implemented in multisite.
@@ -2095,5 +2095,5 @@
 
 		$request->set_param( 'force', 'false' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_trash_not_supported', $response, 501 );
 
@@ -2118,5 +2118,5 @@
 		$request['force'] = true;
 		$request->set_param( 'reassign', false );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		// Not implemented in multisite.
@@ -2146,5 +2146,5 @@
 		$request = new WP_REST_Request( 'DELETE', '/wp/v2/users/me' );
 		$request->set_param( 'reassign', false );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		// Not implemented in multisite.
@@ -2157,5 +2157,5 @@
 
 		$request->set_param( 'force', 'false' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_trash_not_supported', $response, 501 );
 
@@ -2174,5 +2174,5 @@
 		$request['force'] = true;
 		$request->set_param( 'reassign', false );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_user_cannot_delete', $response, 403 );
@@ -2181,5 +2181,5 @@
 		$request['force'] = true;
 		$request->set_param( 'reassign', false );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_user_cannot_delete', $response, 403 );
@@ -2193,5 +2193,5 @@
 		$request['force'] = true;
 		$request->set_param( 'reassign', false );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_user_invalid_id', $response, 404 );
@@ -2219,5 +2219,5 @@
 		$request['force'] = true;
 		$request->set_param( 'reassign', $reassign_id );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		// Not implemented in multisite.
@@ -2243,5 +2243,5 @@
 		$request['force'] = true;
 		$request->set_param( 'reassign', 100 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		// Not implemented in multisite.
@@ -2263,5 +2263,5 @@
 		$request['force'] = true;
 		$request->set_param( 'reassign', 'null' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
@@ -2283,5 +2283,5 @@
 		$request['force'] = true;
 		$request->set_param( 'reassign', false );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		// Not implemented in multisite.
@@ -2310,5 +2310,5 @@
 		$request['force'] = true;
 		$request->set_param( 'reassign', 'false' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		// Not implemented in multisite.
@@ -2337,5 +2337,5 @@
 		$request['force'] = true;
 		$request->set_param( 'reassign', '' );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		// Not implemented in multisite.
@@ -2364,5 +2364,5 @@
 		$request['force'] = true;
 		$request->set_param( 'reassign', 0 );
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		// Not implemented in multisite.
@@ -2378,5 +2378,5 @@
 	public function test_get_item_schema() {
 		$request    = new WP_REST_Request( 'OPTIONS', '/wp/v2/users' );
-		$response   = $this->server->dispatch( $request );
+		$response   = rest_get_server()->dispatch( $request );
 		$data       = $response->get_data();
 		$properties = $data['schema']['properties'];
@@ -2408,5 +2408,5 @@
 		update_option( 'show_avatars', false );
 		$request    = new WP_REST_Request( 'OPTIONS', '/wp/v2/users' );
-		$response   = $this->server->dispatch( $request );
+		$response   = rest_get_server()->dispatch( $request );
 		$data       = $response->get_data();
 		$properties = $data['schema']['properties'];
@@ -2434,5 +2434,5 @@
 		$request = new WP_REST_Request( 'OPTIONS', '/wp/v2/users' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 
@@ -2448,5 +2448,5 @@
 		$request = new WP_REST_Request( 'GET', '/wp/v2/users/1' );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertArrayHasKey( 'my_custom_int', $response->data );
 
@@ -2458,5 +2458,5 @@
 		);
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertEquals( 123, get_user_meta( 1, 'my_custom_int', true ) );
 
@@ -2471,5 +2471,5 @@
 		);
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertEquals( 123, $response->data['my_custom_int'] );
@@ -2509,5 +2509,5 @@
 		);
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 
 		$this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
@@ -2533,5 +2533,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/users/%d', $user_id ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_user_invalid_id', $response, 404 );
 	}
@@ -2553,5 +2553,5 @@
 		$request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/users/%d', $user_id ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_user_invalid_id', $response, 404 );
 	}
@@ -2575,5 +2575,5 @@
 		$request->set_body_params( array( 'first_name' => 'New Name' ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_user_invalid_id', $response, 404 );
 	}
@@ -2597,5 +2597,5 @@
 		$request->set_body_params( array( 'first_name' => 'New Name' ) );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_user_invalid_id', $response, 404 );
 	}
@@ -2619,5 +2619,5 @@
 		$request->set_param( 'reassign', false );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_user_invalid_id', $response, 404 );
 	}
@@ -2641,5 +2641,5 @@
 		$request->set_param( 'reassign', false );
 
-		$response = $this->server->dispatch( $request );
+		$response = rest_get_server()->dispatch( $request );
 		$this->assertErrorResponse( 'rest_user_invalid_id', $response, 404 );
 	}
