Skip to content

Commit e156315

Browse files
Improved description of grabService (#21)
* Update Symfony.php Explaining test.service_container * Update Symfony.php
1 parent 52d43c3 commit e156315

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Codeception/Module/Symfony.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,8 +556,9 @@ public function dontSeeEmailIsSent()
556556
}
557557

558558
/**
559-
* Grabs a service from Symfony DIC container.
560-
* Recommended to use for unit testing.
559+
* Grabs a service from the Symfony dependency injection container (DIC).
560+
* In "test" environment, Symfony uses a special `test.service_container`, see https://symfony.com/doc/current/testing.html#accessing-the-container
561+
* Services that aren't injected somewhere into your app, need to be defined as `public` to be accessible by Codeception.
561562
*
562563
* ``` php
563564
* <?php

0 commit comments

Comments
 (0)