File tree Expand file tree Collapse file tree 1 file changed +0
-10
lines changed Expand file tree Collapse file tree 1 file changed +0
-10
lines changed Original file line number Diff line number Diff line change @@ -1837,8 +1837,6 @@ Testing Request Data
1837
1837
1838
1838
The ``MockResponse `` class comes with some helper methods to test the request:
1839
1839
1840
- * ``getRequestMethod() `` - returns the HTTP method;
1841
- * ``getRequestUrl() `` - returns the URL the request would be sent to;
1842
1840
* ``getRequestOptions() `` - returns an array containing other information about
1843
1841
the request such as headers, query parameters, body content etc.
1844
1842
@@ -1854,12 +1852,6 @@ Usage example::
1854
1852
],
1855
1853
]);
1856
1854
1857
- $mockResponse->getRequestMethod();
1858
- // returns "DELETE"
1859
-
1860
- $mockResponse->getRequestUrl();
1861
- // returns "https://example.com/api/article/1337"
1862
-
1863
1855
$mockResponse->getRequestOptions()['headers'];
1864
1856
// returns ["Accept: */*", "Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l"]
1865
1857
@@ -1933,8 +1925,6 @@ test it in a real application::
1933
1925
$responseData = $service->createArticle($requestData);
1934
1926
1935
1927
// Assert
1936
- self::assertSame('POST', $mockResponse->getRequestMethod());
1937
- self::assertSame('https://example.com/api/article', $mockResponse->getRequestUrl());
1938
1928
self::assertContains(
1939
1929
'Content-Type: application/json',
1940
1930
$mockResponse->getRequestOptions()['headers']
You can’t perform that action at this time.
0 commit comments