ATOM-Group's avatar

How do you use PHPUnit to test Request objects?

I want to be able to test that given some input array, I get the expected MessageBag results out of a Request object, but there doesn't appear to be an easy way to do this.

Is the only way do something like this a full integration test and actually inspecting the $errors object of the view that gets returned?

0 likes
1 reply
pmall's avatar

Is the only way do something like this a full integration test and actually inspecting the $errors object of the view that gets returned?

Isn't this the right way of doing it ?

The error message bag is totally unrelated to the request, it is created by the validator.

Please or to participate in this conversation.