-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
On testing exceptions Collision should not render exceptions #9
Comments
I think you need some kind of middleware to that, or tweak your exception handler. Not sure if this should be package specific. Just my two cents! If I have some time left today I will look into this a bit more ;) |
@bobbybouwmann Thanks for those two cents! I may dive into this issue this weekend 😎 |
I think it also shouldn't react in tests to default exceptions like: Validation, Unauthorized, Unauthenticated. I'm writing test and expect to get 401, of course it passes, but dunno if your listener should catch such exceptions, or maybe it would be great to have ignoredExceptions configuration:
All in all, awesome package. :) |
@san4io Thanks for the feedback and for your suggestion! I will definitely find something this issue. I just didn't have 5 mins minutes to look into to it. I may check tomorrow! |
@bobbybouwmann @san4io I was thinking about using the method Like committed on this hot-fix branch: ae9f452 Like that, all Laravel Internal exceptions are ignored on Other option, is just render an exception via Collision when the status code is |
The version |
This looks pretty good to me! Great job on this :D |
In Laravel, we may want to test if an exception is throw correctly. Given the following routes/web.php:
And the following test:
Our application exception handler should not render an exception.
The text was updated successfully, but these errors were encountered: