/**
  * @param IContainer $container
  * @param IMonologErrorHandlerConfig $monologConfig
  * @param IErrorHandler $errorHandler
  * @param IMonologChannelManager $channelManager
  */
 public function initialize(IContainer $container, IMonologErrorHandlerConfig $monologConfig, IErrorHandler $errorHandler, IMonologChannelManager $channelManager)
 {
     $logger = $channelManager->getLogger($monologConfig->getErrorChannelName());
     $monologErrorHandler = new MonologErrorHandler($logger, $errorHandler);
     $monologErrorHandler->enableErrorHandling();
     $monologErrorHandler->enableExceptionHandling();
     $container->set(MonologErrorHandler::class, $monologErrorHandler);
 }
 public function test_handle_exception()
 {
     $this->clearLog();
     $monologErrorHandler = new MonologErrorHandler($this->createLogger(), new ErrorHandler());
     $monologErrorHandler->handleException(new Exception('fake error'));
     $this->assertTrue($this->logHas('Uncaught Exception Exception: "fake error"'));
 }