From 198cdc377e20932434a1bf1117272ffbbada8c21 Mon Sep 17 00:00:00 2001 From: "L. Fliss" Date: Tue, 3 May 2022 16:03:17 +0200 Subject: [PATCH] Update http_client.rst These two methods are not present in Symfony 4.4 --- http_client.rst | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/http_client.rst b/http_client.rst index fe0a6ddb2b1..17a31627844 100644 --- a/http_client.rst +++ b/http_client.rst @@ -1472,8 +1472,6 @@ Testing Request Data The ``MockResponse`` class comes with some helper methods to test the request: -* ``getRequestMethod()`` - returns the HTTP method; -* ``getRequestUrl()`` - returns the URL the request would be sent to; * ``getRequestOptions()`` - returns an array containing other information about the request such as headers, query parameters, body content etc. @@ -1489,12 +1487,6 @@ Usage example:: ], ]); - $mockResponse->getRequestMethod(); - // returns "DELETE" - - $mockResponse->getRequestUrl(); - // returns "https://example.com/api/article/1337" - $mockResponse->getRequestOptions()['headers']; // returns ["Accept: */*", "Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l"] @@ -1568,8 +1560,6 @@ test it in a real application:: $responseData = $service->createArticle($requestData); // Assert - self::assertSame('POST', $mockResponse->getRequestMethod()); - self::assertSame('https://example.com/api/article', $mockResponse->getRequestUrl()); self::assertContains( 'Content-Type: application/json', $mockResponse->getRequestOptions()['headers']