Skip to content

Commit c86e957

Browse files
JohnstonCodejaviereguiluz
authored andcommitted
[HttpClient] Update http client testing section
1 parent 4d1e429 commit c86e957

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

http_client.rst

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,8 +1471,6 @@ Testing Request Data
14711471

14721472
The ``MockResponse`` class comes with some helper methods to test the request:
14731473

1474-
* ``getRequestMethod()`` - returns the HTTP method;
1475-
* ``getRequestUrl()`` - returns the URL the request would be sent to;
14761474
* ``getRequestOptions()`` - returns an array containing other information about
14771475
the request such as headers, query parameters, body content etc.
14781476

@@ -1488,12 +1486,6 @@ Usage example::
14881486
],
14891487
]);
14901488

1491-
$mockResponse->getRequestMethod();
1492-
// returns "DELETE"
1493-
1494-
$mockResponse->getRequestUrl();
1495-
// returns "https://example.com/api/article/1337"
1496-
14971489
$mockResponse->getRequestOptions()['headers'];
14981490
// returns ["Accept: */*", "Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l"]
14991491

@@ -1567,8 +1559,6 @@ test it in a real application::
15671559
$responseData = $service->createArticle($requestData);
15681560

15691561
// Assert
1570-
self::assertSame('POST', $mockResponse->getRequestMethod());
1571-
self::assertSame('https://example.com/api/article', $mockResponse->getRequestUrl());
15721562
self::assertContains(
15731563
'Content-Type: application/json',
15741564
$mockResponse->getRequestOptions()['headers']

0 commit comments

Comments
 (0)