8000 Merge remote-tracking branch 'origin/master' · craue/symfony-docs@dbe0e62 · GitHub
[go: up one dir, main page]

Skip to content

Commit dbe0e62

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents fa46c13 + 9262923 commit dbe0e62

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

book/testing.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,10 @@ The Client supports many operations that can be done in a real browser::
401401
Accessing Internal Objects
402402
~~~~~~~~~~~~~~~~~~~~~~~~~~
403403

404+
.. versionadded:: 2.3
405+
The ``getInternalRequest()`` and ``getInternalResponse()`` method were
406+
added in Symfony 2.3.
407+
404408
If you use the client to test your application, you might want to access the
405409
client's internal objects::
406410

@@ -409,8 +413,18 @@ client's internal objects::
409413

410414
You can also get the objects related to the latest request::
411415

416+
// the HttpKernel request instance
412417
$request = $client->getRequest();
418+
419+
// the BrowserKit request instance
420+
$request = $client->getInternalRequest();
421+
422+
// the HttpKernel response instance
413423
$response = $client->getResponse();
424+
425+
// the BrowserKit response instance
426+
$response = $client->getInternalResponse();
427+
414428
$crawler = $client->getCrawler();
415429

416430
If your requests are not insulated, you can also access the ``Container`` and

0 commit comments

Comments
 (0)
0