/** * Register the service provider. * * @return void */ public function register() { $app = $this->app; $this->app->before(function () use($app) { $app->error(ErrorHandlerFactory::make()); }); }
public function testMake() { $callback = ErrorHandlerFactory::make(); $e = new ResponseException(); $e->setResponse($expected = range(1, 10)); $this->assertInstanceOf('Closure', $callback); $this->assertEquals($expected, $callback($e)); }