diff --git a/tests/phpunit/includes/testcase-rest-api.php b/tests/phpunit/includes/testcase-rest-api.php index c857e0e392..5430d269d1 100644 --- a/tests/phpunit/includes/testcase-rest-api.php +++ b/tests/phpunit/includes/testcase-rest-api.php @@ -7,7 +7,7 @@ abstract class WP_Test_REST_TestCase extends WP_UnitTestCase { $response = $response->as_error(); } - $this->assertInstanceOf( 'WP_Error', $response ); + $this->assertWPError( $response ); $this->assertEquals( $code, $response->get_error_code() ); if ( null !== $status ) { diff --git a/tests/phpunit/tests/date/query.php b/tests/phpunit/tests/date/query.php index 0445fd819f..fe31577e04 100644 --- a/tests/phpunit/tests/date/query.php +++ b/tests/phpunit/tests/date/query.php @@ -9,6 +9,9 @@ * @group date */ class Tests_WP_Date_Query extends WP_UnitTestCase { + /** + * @var WP_Date_Query $q + */ public $q; public function setUp() { diff --git a/tests/phpunit/tests/rest-api/rest-autosaves-controller.php b/tests/phpunit/tests/rest-api/rest-autosaves-controller.php index 609fbb73c9..0984bd3f83 100644 --- a/tests/phpunit/tests/rest-api/rest-autosaves-controller.php +++ b/tests/phpunit/tests/rest-api/rest-autosaves-controller.php @@ -38,7 +38,7 @@ class WP_Test_REST_Autosaves_Controller extends WP_Test_REST_Post_Type_Controlle } protected function check_create_autosave_response( $response ) { - $this->assertNotInstanceOf( 'WP_Error', $response ); + $this->assertNotWPError( $response ); $response = rest_ensure_response( $response ); $data = $response->get_data();