Skip to content

Commit 009107f

Browse files
committed
Merge branch '4.4' into 5.4
* 4.4: [HttpClient] Update http client testing section
2 parents c5ef631 + 1273311 commit 009107f

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
@@ -1837,8 +1837,6 @@ Testing Request Data
18371837

18381838
The ``MockResponse`` class comes with some helper methods to test the request:
18391839

1840-
* ``getRequestMethod()`` - returns the HTTP method;
1841-
* ``getRequestUrl()`` - returns the URL the request would be sent to;
18421840
* ``getRequestOptions()`` - returns an array containing other information about
18431841
the request such as headers, query parameters, body content etc.
18441842

@@ -1854,12 +1852,6 @@ Usage example::
18541852
],
18551853
]);
18561854

1857-
$mockResponse->getRequestMethod();
1858-
// returns "DELETE"
1859-
1860-
$mockResponse->getRequestUrl();
1861-
// returns "https://example.com/api/article/1337"
1862-
18631855
$mockResponse->getRequestOptions()['headers'];
18641856
// returns ["Accept: */*", "Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l"]
18651857

@@ -1933,8 +1925,6 @@ test it in a real application::
19331925
$responseData = $service->createArticle($requestData);
19341926

19351927
// Assert
1936-
self::assertSame('POST', $mockResponse->getRequestMethod());
1937-
self::assertSame('https://example.com/api/article', $mockResponse->getRequestUrl());
19381928
self::assertContains(
19391929
'Content-Type: application/json',
19401930
$mockResponse->getRequestOptions()['headers']

0 commit comments

Comments
 (0)