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()); }
/** {@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); }