title: How to Disable Selected Middleware in Laravel Tests
body: <p>It is common that errors from Authentication and CSRF arise when running <code>phpunit</code>.</p>
  <p>In the TestCase we use:</p>
  <p><code>use WithoutMiddleware;</code></p>
  <p>The problem is 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 <code>Input::old('username');</code> or the flash message.</p>
  <p>Furthermore our tests of this failed form post returns:</p>
  <pre><code>Caused by
  exception 'RuntimeException' with message 'Session store not set on request.
  </code></pre>
  <p>Is there a way to enable the Session Middleware and disable everything else.</p>