/**
  * Enable suppressing of errors.
  */
 public function enable()
 {
     // suppress all errors
     $this->errorHandler->addErrorHandler(function () {
         return true;
     });
     $this->errorHandler->addExceptionHandler(function (Exception $ex) {
         return true;
     });
 }
 function it_initializes(IHttpApp $httpApp, IErrorHandler $errorHandler, IContainer $container)
 {
     $httpApp->getDebug()->willReturn(true);
     $errorHandler->addErrorHandler(Argument::any())->shouldBeCalled();
     $errorHandler->addExceptionHandler(Argument::any())->shouldBeCalled();
     $container->set(JsonErrorHandler::class, Argument::type(JsonErrorHandler::class))->shouldBeCalled();
     $this->initialize($httpApp, $errorHandler, $container);
 }
 /**
  * Enable exception handling.
  */
 public function enableExceptionHandling()
 {
     $this->errorHandler->addExceptionHandler([$this, 'handleException']);
 }
 function it_enables_exception_handling(IErrorHandler $errorHandler)
 {
     $errorHandler->addExceptionHandler([$this, 'handleException'])->shouldBeCalled();
     $this->enableExceptionHandling();
 }
 function it_enables_error_handling(IErrorHandler $errorHandler)
 {
     $errorHandler->addErrorHandler(Argument::type('callable'))->shouldBeCalled();
     $errorHandler->addExceptionHandler(Argument::type('callable'))->shouldBeCalled();
     $this->enable();
 }