public function test_enable_exception_handling()
 {
     $errorHandler = new ErrorHandler();
     $bugsnagErrorHandler = new BugsnagErrorHandler(new Bugsnag_Client('client_id'), $errorHandler);
     $this->assertEquals(0, count($errorHandler->getExceptionHandlers()));
     $bugsnagErrorHandler->enableExceptionHandling();
     $this->assertEquals(1, count($errorHandler->getExceptionHandlers()));
 }
 public function test_enable_exception_handling()
 {
     $errorHandler = new ErrorHandler();
     $monologErrorHandler = new MonologErrorHandler($this->createLogger(), $errorHandler);
     $this->assertEquals(0, count($errorHandler->getExceptionHandlers()));
     $monologErrorHandler->enableExceptionHandling();
     $this->assertEquals(1, count($errorHandler->getExceptionHandlers()));
 }
Пример #3
0
 public function test_add_exception_handler_implementation()
 {
     $handler = new ErrorHandler();
     $this->assertEquals(0, count($handler->getExceptionHandlers()));
     $handler->addExceptionHandler(new FakeExceptionHandler());
     $this->assertEquals(1, count($handler->getExceptionHandlers()));
 }