Skip to content

Commit 22e5436

Browse files
authored
Update http client testing section
I have remove all references to MockResponse::getRequestMethod as this was added in 5.2
1 parent 4d1e429 commit 22e5436

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

http_client.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,7 +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;
14751474
* ``getRequestUrl()`` - returns the URL the request would be sent to;
14761475
* ``getRequestOptions()`` - returns an array containing other information about
14771476
the request such as headers, query parameters, body content etc.
@@ -1488,9 +1487,6 @@ Usage example::
14881487
],
14891488
]);
14901489

1491-
$mockResponse->getRequestMethod();
1492-
// returns "DELETE"
1493-
14941490
$mockResponse->getRequestUrl();
14951491
// returns "https://example.com/api/article/1337"
14961492

@@ -1567,7 +1563,6 @@ test it in a real application::
15671563
$responseData = $service->createArticle($requestData);
15681564

15691565
// Assert
1570-
self::assertSame('POST', $mockResponse->getRequestMethod());
15711566
self::assertSame('https://example.com/api/article', $mockResponse->getRequestUrl());
15721567
self::assertContains(
15731568
'Content-Type: application/json',

0 commit comments

Comments
 (0)