Ejemplo n.º 1
0
 public function testTestHandlerHandlesError()
 {
     $context = array('option' => 'value');
     $this->assertFalse($this->testHandler->getErrorHandled());
     $this->errorHandler->handleError(E_USER_ERROR, 'message', __FILE__, __LINE__, $context);
     $this->assertTrue($this->testHandler->getErrorHandled());
     $this->assertEquals($context, $this->testHandler->getContext());
 }
Ejemplo n.º 2
0
 /** {@inheritdoc} */
 public function handleError(ErrorException $error, Metadata $metadata = null)
 {
     $metadata = $this->addDefaultCategory($metadata);
     $this->errorHandler->handleError($error->getCode(), $error->getMessage(), $error->getFile(), $error->getLine(), $error->getContext(), $metadata);
 }