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 @@ -1471,8 +1471,6 @@ Testing Request Data
1471
1471
1472
1472
The ``MockResponse `` class comes with some helper methods to test the request:
1473
1473
1474
- * ``getRequestMethod() `` - returns the HTTP method;
1475
- * ``getRequestUrl() `` - returns the URL the request would be sent to;
1476
1474
* ``getRequestOptions() `` - returns an array containing other information about
1477
1475
the request such as headers, query parameters, body content etc.
1478
1476
@@ -1488,12 +1486,6 @@ Usage example::
1488
1486
],
1489
1487
]);
1490
1488
1491
- $mockResponse->getRequestMethod();
1492
- // returns "DELETE"
1493
-
1494
- $mockResponse->getRequestUrl();
1495
- // returns "https://example.com/api/article/1337"
1496
-
1497
1489
$mockResponse->getRequestOptions()['headers'];
1498
1490
// returns ["Accept: */*", "Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l"]
1499
1491
@@ -1567,8 +1559,6 @@ test it in a real application::
1567
1559
$responseData = $service->createArticle($requestData);
1568
1560
1569
1561
// Assert
1570
- self::assertSame('POST', $mockResponse->getRequestMethod());
1571
- self::assertSame('https://example.com/api/article', $mockResponse->getRequestUrl());
1572
1562
self::assertContains(
1573
1563
'Content-Type: application/json',
1574
1564
$mockResponse->getRequestOptions()['headers']
You can’t perform that action at this time.
0 commit comments