Disabling Middleware in Lumen Tests

Testing

Committed to the LaraBrain by: wjgilmore (@wjgilmore) at July 11, 2016 8:36 pm

Lumen doesn't support the testing middleware trait, but there's another way to disable middleware in your tests

Add the following line to your TestCase.php class:

public function setUp()
{
    parent::setUp();
    $this->app->instance('middleware.disable', true);
}