From fd7c423bc47ced1b166fd82bc83f1b7d3473ff6e Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Thu, 22 Oct 2020 11:51:11 +0200 Subject: [PATCH 1/2] Update Symfony.php Explaining test.service_container --- src/Codeception/Module/Symfony.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Codeception/Module/Symfony.php b/src/Codeception/Module/Symfony.php index 39756533..3454c206 100644 --- a/src/Codeception/Module/Symfony.php +++ b/src/Codeception/Module/Symfony.php @@ -554,8 +554,9 @@ public function dontSeeEmailIsSent() } /** - * Grabs a service from Symfony DIC container. - * Recommended to use for unit testing. + * Grabs a service from the Symfony container. + * In "test" environment, Symfony uses a special `test.service_container`, see https://symfony.com/doc/current/testing.html#accessing-the-container + * Services that aren't injected somewhere into your app, need to be defined as `public` to be accessible by Codeception. * * ``` php * Date: Thu, 22 Oct 2020 14:14:39 +0200 Subject: [PATCH 2/2] Update Symfony.php --- src/Codeception/Module/Symfony.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Codeception/Module/Symfony.php b/src/Codeception/Module/Symfony.php index 3454c206..ace61d22 100644 --- a/src/Codeception/Module/Symfony.php +++ b/src/Codeception/Module/Symfony.php @@ -554,7 +554,7 @@ public function dontSeeEmailIsSent() } /** - * Grabs a service from the Symfony container. + * Grabs a service from the Symfony dependency injection container (DIC). * In "test" environment, Symfony uses a special `test.service_container`, see https://symfony.com/doc/current/testing.html#accessing-the-container * Services that aren't injected somewhere into your app, need to be defined as `public` to be accessible by Codeception. *