public function testExceptionHandler() { $this->assertEquals(0, $this->errorHandler->getStats()->getExceptionsHandled()); $this->errorHandler->register(false, true, false); $this->errorHandler->handleException(new \Exception('test')); $this->errorHandler->unregister(); $this->assertEquals(1, $this->errorHandler->getStats()->getExceptionsHandled()); }
public function testTestHandlerHandlesException() { $this->assertFalse($this->testHandler->getExceptionHandled()); $this->errorHandler->handleException(new \Exception()); $this->assertTrue($this->testHandler->getExceptionHandled()); }
/** {@inheritdoc} */ public function handleException(\Exception $exception, Metadata $metadata = null) { $metadata = $this->addDefaultCategory($metadata); $this->errorHandler->handleException($exception, $metadata); }
public function testCallbackExecuted() { $this->assertFalse($this->testProcessor->getCallbackExecuted()); $this->errorHandler->handleException(new \Exception()); $this->assertTrue($this->testProcessor->getCallbackExecuted()); }