Commit 1a9e936
Add functional test for grabContainer()
Cover grabContainer(), added in codeception/module-symfony: assert it returns the
container for the test environment, and that it is the test container rather than
the kernel's own. The last two assertions are the point of the method: the test
container resolves a private service that the kernel container cannot see, which
is what made the widespread grabService('kernel')->getContainer() workaround
subtly wrong.
No app fixtures are needed: EntityManagerInterface is registered as a private
autowiring alias by doctrine-bundle on every branch.
The test is identical on every branch.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H9UKS58pxkiV3ovVP9J4tB1 parent 8ea4d6d commit 1a9e936
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
13 | 27 | | |
14 | 28 | | |
15 | 29 | | |
| |||
0 commit comments