-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[5.8] Fix expects output bug #29248
[5.8] Fix expects output bug #29248
Conversation
Well obviously, this does bring some issues as-well :D I'll look into that. It also appears that the fix is not that simple, because a mockery exception is thrown when calling So the original bug is gone, but it brings a new one. Maybe using some try/catch/finally could help us here. |
Using a try/catch/finally helps a bit. It allows us to display the Laravel custom error message. But since I'll push the changes I've made with the try/finnaly thing and look if I can find a way to destroy the mock before |
I finally made it work :) So to sum it up.
Any call to the As the Given that the Broken testsWell now I guess I'll have to look at why the test broke |
Hum, regarding the broken tests it looks like a pr should also be made on orchestra/testbench. So lets just see here if this solution fits everyone and if it does we'll get into making a pr on orchestra/testbench. |
Thanks for the PR. I'm wondering if Laravel 5.9 would be a better place for this. We don't want to break existing funky test code, relying on the existing setup. |
Yes, definitely Laravel 5.9 will be the right place to make these changes then. :) |
Please send a PR to the |
Hey,
I found a bit of time to implement the afterApplicationDestroyed callback system that I talked about in #29246.
So this pr solves #29246.
I am not sure about the place where I call the afterApplicationDestroyed callbacks, maybe they could be called a bit earlier?
If you want to see the code in action it is used in the https://github.com/paulhenri-l/laravel-command-test-bug repository on the
test-fix
branch.