Index: tests/phpunit/includes/testcase-rest-post-type-controller.php
===================================================================
--- tests/phpunit/includes/testcase-rest-post-type-controller.php	(revision 40304)
+++ tests/phpunit/includes/testcase-rest-post-type-controller.php	(working copy)
@@ -202,6 +202,7 @@
 	protected function check_get_posts_response( $response, $context = 'view' ) {
 		$this->assertNotInstanceOf( 'WP_Error', $response );
 		$response = rest_ensure_response( $response );
+		$this->assertNotInstanceOf( 'WP_Error', $response->as_error() );
 		$this->assertEquals( 200, $response->get_status() );

 		$headers = $response->get_headers();
@@ -229,6 +230,7 @@
 	protected function check_get_post_response( $response, $context = 'view' ) {
 		$this->assertNotInstanceOf( 'WP_Error', $response );
 		$response = rest_ensure_response( $response );
+		$this->assertNotInstanceOf( 'WP_Error', $response->as_error() );
 		$this->assertEquals( 200, $response->get_status() );

 		$data = $response->get_data();
@@ -240,6 +242,7 @@
 	protected function check_create_post_response( $response ) {
 		$this->assertNotInstanceOf( 'WP_Error', $response );
 		$response = rest_ensure_response( $response );
+		$this->assertNotInstanceOf( 'WP_Error', $response->as_error() );

 		$this->assertEquals( 201, $response->get_status() );
 		$headers = $response->get_headers();
@@ -253,6 +256,7 @@
 	protected function check_update_post_response( $response ) {
 		$this->assertNotInstanceOf( 'WP_Error', $response );
 		$response = rest_ensure_response( $response );
+		$this->assertNotInstanceOf( 'WP_Error', $response->as_error() );

 		$this->assertEquals( 200, $response->get_status() );
 		$headers = $response->get_headers();
Index: tests/phpunit/tests/rest-api/rest-posts-controller.php
===================================================================
--- tests/phpunit/tests/rest-api/rest-posts-controller.php	(revision 40304)
+++ tests/phpunit/tests/rest-api/rest-posts-controller.php	(working copy)
@@ -2837,7 +2837,7 @@
 		$request->set_param( 'force', 'false' );
 		$response = $this->server->dispatch( $request );

-		$this->assertNotInstanceOf( 'WP_Error', $response );
+		$this->assertNotInstanceOf( 'WP_Error', $response->as_error() );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
 		$this->assertEquals( 'Deleted post', $data['title']['raw'] );
@@ -2852,7 +2852,7 @@
 		$request['force'] = true;
 		$response = $this->server->dispatch( $request );

-		$this->assertNotInstanceOf( 'WP_Error', $response );
+		$this->assertNotInstanceOf( 'WP_Error', $response->as_error() );
 		$this->assertEquals( 200, $response->get_status() );
 		$data = $response->get_data();
 		$this->assertTrue( $data['deleted'] );
