File tree 1 file changed +14
-0
lines changed 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -401,6 +401,10 @@ The Client supports many operations that can be done in a real browser::
401
401
Accessing Internal Objects
402
402
~~~~~~~~~~~~~~~~~~~~~~~~~~
403
403
404
+ .. versionadded :: 2.3
405
+ The ``getInternalRequest() `` and ``getInternalResponse() `` method were
406
+ added in Symfony 2.3.
407
+
404
408
If you use the client to test your application, you might want to access the
405
409
client's internal objects::
406
410
@@ -409,8 +413,18 @@ client's internal objects::
409
413
410
414
You can also get the objects related to the latest request::
411
415
416
+ // the HttpKernel request instance
412
417
$request = $client->getRequest();
418
+
419
+ // the BrowserKit request instance
420
+ $request = $client->getInternalRequest();
421
+
422
+ // the HttpKernel response instance
413
423
$response = $client->getResponse();
424
+
425
+ // the BrowserKit response instance
426
+ $response = $client->getInternalResponse();
427
+
414
428
$crawler = $client->getCrawler();
415
429
416
430
If your requests are not insulated, you can also access the ``Container `` and
You can’t perform that action at this time.
0 commit comments