Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9262923

Browse filesBrowse files
committed
Merge pull request symfony#2549 from fabpot/browserkit-client
updated documentation for BrowserKit
2 parents 786b530 + 40d32d5 commit 9262923
Copy full SHA for 9262923

File tree

Expand file treeCollapse file tree

1 file changed

+14
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+14
-0
lines changed

‎book/testing.rst

Copy file name to clipboardExpand all lines: book/testing.rst
+14Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.