Commit 8ea4d6d
Add functional test for resetDoctrineManager()
Cover resetDoctrineManager(), added in codeception/module-symfony. Assert both
halves of its contract: an open manager is only cleared, so a previously managed
entity is no longer in the identity map, and a closed manager is reopened. The
seeNumRecords() call at the end proves the transaction the Doctrine module opened
for the test survived the reset.
No app fixtures are needed: the test closes the manager itself rather than
provoking a failed flush, which keeps it deterministic under settings.shuffle.
The test is identical on every branch. The module recovers through Doctrine's
registry where the entity manager service is lazy and by rebooting the kernel
where it is not, but both paths are observable only as a reopened manager.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H9UKS58pxkiV3ovVP9J4tB1 parent 126a68c commit 8ea4d6d
1 file changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
52 | 70 | | |
53 | 71 | | |
54 | 72 | | |
| |||
0 commit comments