FormRequest does not work in same way as \Illuminate\Http\Request in unit testing? #35441
Unanswered
ProteanCode
asked this question in
Q&A
Replies: 1 comment
-
I think I may report this as a bug because I have created following class:
and the unit test ends with failure when I use Laravel 8.16 PHP 7.4 if that matters |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Consider following versions of controller methods
public function step1(\App\Http\Requests\RegistrationStep1 $request)
and just
public function step1(\Illuminate\Http\Request $request)
the second one works fine with following unit test
but the first definition that uses FormRequest does not pass, both assertion fails.
Beta Was this translation helpful? Give feedback.
All reactions