Example #1
0
 /**
  * @expectedException \LogicException
  */
 public function testExceptionDecoratorDoesntReturnResponseObject()
 {
     $app = new Application();
     $app->setExceptionDecorator(function ($e) {
         return true;
     });
     $request = Request::createFromGlobals();
     $app->subscribe('request.received', function ($event, $request, $response) {
         throw new \Exception('A test exception');
     });
     $response = $app->handle($request);
 }