public function testAddError()
 {
     $exception = $this->getException();
     $time = $this->getTime();
     $this->getAllureAdapter()->addError($this, $exception, $time);
     $events = $this->getMockedLifecycle()->getEvents();
     $event = new TestCaseBrokenEvent();
     $event->withException($exception)->withMessage(EXCEPTION_MESSAGE);
     $this->assertEquals(1, sizeof($events));
     $this->assertInstanceOf('\\Yandex\\Allure\\Adapter\\Event\\TestCaseBrokenEvent', $events[0]);
     $this->assertEquals($event, $events[0]);
 }
 /**
  * An error occurred.
  *
  * @param PHPUnit_Framework_Test $test
  * @param Exception $e
  * @param float $time
  */
 public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
 {
     $event = new TestCaseBrokenEvent();
     Allure::lifecycle()->fire($event->withException($e)->withMessage($e->getMessage()));
 }
 /**
  * @param FailEvent $failEvent
  */
 public function testError(FailEvent $failEvent)
 {
     $event = new TestCaseBrokenEvent();
     $e = $failEvent->getFail();
     $message = $e->getMessage();
     $this->getLifecycle()->fire($event->withException($e)->withMessage($message));
 }