diff --git a/tests/phpunit/tests/rest-api/wpRestTemplatesController.php b/tests/phpunit/tests/rest-api/wpRestTemplatesController.php index f8b99c6cdb5b8..8ffa8b4e79023 100644 --- a/tests/phpunit/tests/rest-api/wpRestTemplatesController.php +++ b/tests/phpunit/tests/rest-api/wpRestTemplatesController.php @@ -288,7 +288,7 @@ public function test_get_item() { */ public function test_get_item_should_return_no_response_body_for_head_requests() { wp_set_current_user( self::$admin_id ); - $request = new WP_REST_Request( 'GET', '/wp/v2/templates/default//my_template' ); + $request = new WP_REST_Request( 'HEAD', '/wp/v2/templates/default//my_template' ); $response = rest_get_server()->dispatch( $request ); $this->assertSame( 200, $response->get_status(), 'Response status is 200.' ); $this->assertNull( $response->get_data(), 'The server should not generate a body in response to a HEAD request.' );