Make validation exception's error bag visible when testing #34065
Unanswered
furatamasensei
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was wondering about the current validation exception handling when testing a laravel app. For now, we only get this message when using
$this->withoutExceptionHandling()
method in oursetUp
:However, I was expecting it to be more like this:
It is easier to us to debug when something is happening in the validation scope so we don't need to guess what errors in what field when we just want to make sure the data is properly inserted to the database using
factory
. I see no point of implementing a unit test if we ended up using postman/3rd party software to test the API itself.I also posted a question here in stackoverflow but no one seems to have the answer yet.
Does this feature is already exist or am I missed something?
Beta Was this translation helpful? Give feedback.
All reactions