Example #1
0
 /**
  * Actions after each test.
  *
  * @param MethodEvent $event
  */
 public function afterTest(MethodEvent $event)
 {
     try {
         $this->dispatcher->dispatch(EventStorage::EV_AFTER_TEST, clone $event);
         $this->precondition->dispatch(EventStorage::EV_AFTER_TEST, clone $event);
     } catch (\Exception $exception) {
         $this->context->onAfterTest($exception);
         $event = $this->preconditionFailed($exception);
         /** @var Skip $controller */
         $controller = $this->parent->switchTo(ControllerParentInterface::CONTROLLER_SKIP);
         $controller->setDepends($event->getMethod());
     }
 }