@@ -509,15 +509,13 @@ Accessing the Container
509
509
~~~~~~~~~~~~~~~~~~~~~~~
510
510
511
511
.. versionadded :: 4.1
512
-
513
512
The ``self::$container `` property was introduced in Symfony 4.1.
514
513
515
514
It's highly recommended that a functional test only tests the response. But
516
- under certain very rare circumstances, you might want to access some internal
517
- objects to write assertions. In such cases, you can access your services via
518
- a special property on the test class. Because services are private by default,
519
- this property holds a special container, which allows fetching public and all
520
- non-removed private services::
515
+ under certain very rare circumstances, you might want to access some services
516
+ to write assertions. Given that services are private by default, test classes
517
+ define a property that stores a special container created by Symfony which
518
+ allows fetching both public and all non-removed private services::
521
519
522
520
// gives access to the same services used in your test, unless you're using
523
521
// $client->insulate() or using real HTTP requests to test your application
@@ -529,8 +527,8 @@ command.
529
527
.. tip ::
530
528
531
529
The special container that gives access to private services exists only in
532
- the ``test `` environment and is itself a service that you can accessed from
533
- the real container using the ``test.service_container `` id.
530
+ the ``test `` environment and is itself a service that you can get from the
531
+ real container using the ``test.service_container `` id.
534
532
535
533
.. tip ::
536
534
0 commit comments