@@ -198,7 +198,7 @@ expression or a CSS selector, then use the client to click on it. For example::
198
198
->eq(1) // select the second link in the list
199
199
->link()
200
200
;
201
-
201
+
202
202
// and click it
203
203
$crawler = $client->click($link);
204
204
@@ -451,25 +451,20 @@ You can also get the objects related to the latest request::
451
451
452
452
$crawler = $client->getCrawler();
453
453
454
- If your requests are not insulated, you can also access the ``Container `` and
455
- the ``Kernel ``::
456
-
457
- $container = $client->getContainer();
458
- $kernel = $client->getKernel();
459
-
460
454
Accessing the Container
461
455
~~~~~~~~~~~~~~~~~~~~~~~
462
456
463
- It's highly recommended that a functional test only tests the Response . But
457
+ It's highly recommended that a functional test only tests the response . But
464
458
under certain very rare circumstances, you might want to access some internal
465
459
objects to write assertions. In such cases, you can access the Dependency
466
460
Injection Container::
467
461
462
+ // will be the same container used in your test, unless you're using
463
+ // $client->insulate() or using real HTTP requests to test your application
468
464
$container = $client->getContainer();
469
465
470
- Be warned that this does not work if you insulate the client or if you use an
471
- HTTP layer. For a list of services available in your application, use the
472
- ``debug:container `` console task.
466
+ For a list of services available in your application, use the ``debug:container ``
467
+ console task.
473
468
474
469
.. versionadded :: 2.6
475
470
Prior to Symfony 2.6, this command was called ``container:debug ``.
0 commit comments