-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug][BrowserKit] #20815
Comments
Only later I found "https://symfony.com/doc/current/testing.html#multiple-requests-in-one-test" I apologize... |
@GrinWay since you found this, is your issue still relevant? |
Not at all, I just used KernelBrowser::disableReboot() and as expected kernel stopped rebooting and all of my mocks remained as well |
What do you think could be changed in the docs to make the behaviour more clear? |
Wow I did not even expect that you'll ask this First of all I'm pleasantly surprised by your question :) Well, to tell the truth it would be nice at least to refer to this "https://symfony.com/doc/current/testing.html#multiple-requests-in-one-test" link exactly in the BrowserKit component docs in a separate small testing section. I guess called like [Testing][Browser client default behaviour] By default browser client is intended to be used once, because after that the whole service container will be rebooted because of the kernel rebooting it means that all of your mocked services will get lost, to avoid that and use request several times per a test call the KernelBrowser::disableReboot() method. |
I already wanted to file a bug because of unexpected behaviour I was dealing with for the last DAY
but as it turns out it just NOT documented behaviour
BrowserKit docs tells nothing about KernelBrowser::disableReboot() method
I was thinking a lot why all of my mocks just disappeared and test started using real services, real http_clients...
All the container was rebooted after the first request because of the default behaviour that HAS NOT BEEN DOCUMENTED YET
I'm crying
The text was updated successfully, but these errors were encountered: