{{editor}}'s edit
{{editor}}'s edit
-
Hello, community! I have a question related to testing. I do remember times, when I could set some mock in container like that:
And then do several requests, relying on that mock. Then just perform some asserts and check result.
In my current Symfony version (5.4) I can't do that. For the second request, my mock inside container is just being reset. Eventually my test case fails because of that. And I need setup container service again before each next request. Did somebody had such situation? I haven't found any issues or discussion about that. Maybe there were some info about that also. Can somebody clarify why it is like that? And since which moment that was implemented? |
Beta Was this translation helpful? Give feedback.
Replies: 1 suggested answer 3 replies
-
By default, the client will reboot the kernel between requests. A reboot of the kernel replaces the whole container with a new one (and in this new one, no replacement has been done). |
Beta Was this translation helpful? Give feedback.
By default, the client will reboot the kernel between requests. A reboot of the kernel replaces the whole container with a new one (and in this new one, no replacement has been done).