So it is common that errors from Authentication and CSRF arise when running phpunit
.
So in the TestCase we use:
use WithoutMiddleware;
The problem with this is that when forms fail, it usually comes back with a Flash Message and Old Input. We have disabled all middleware so we have no access to Input::old('username');
or the flash message.
Furthermore our tests of this failed form post returns:
Caused by
exception 'RuntimeException' with message 'Session store not set on request.
Is there a way to enable the Session Middleware and disable everything else.