public function __construct(AfterOutlineTested $event, $steps)
 {
     $this->event = $event;
     if (count($event->getOutline()->getExampleTable()->getTable()) > 0) {
         $this->parameters = array_values($event->getOutline()->getExampleTable()->getTable())[0];
     } else {
         $this->parameters = array();
     }
     $this->generateExamples($steps);
     $this->generateSteps();
 }
 /**
  * @param AfterOutlineTested $event
  */
 public function onAfterOutlineTested(AfterOutlineTested $event)
 {
     $scenarioPassed = $event->getTestResult()->isPassed();
     if ($scenarioPassed) {
         $this->passedScenarios[] = $this->currentScenario;
         $this->currentFeature->addPassedScenario();
     } else {
         $this->failedScenarios[] = $this->currentScenario;
         $this->currentFeature->addFailedScenario();
     }
     $this->currentScenario->setLoopCount(sizeof($event->getTestResult()));
     $this->currentScenario->setPassed($event->getTestResult()->isPassed());
     $this->currentFeature->addScenario($this->currentScenario);
     $print = $this->renderer->renderAfterOutline($this);
     $this->printer->writeln($print);
 }
 /**
  * @param BehatEvent\AfterOutlineTested $event
  */
 public function onAfterOutlineTested(BehatEvent\AfterOutlineTested $event)
 {
     $scenarioPassed = $event->getTestResult()->isPassed();
     if ($scenarioPassed) {
         $this->passedScenarios[] = $this->currentScenario;
         $this->currentFeature->addPassedScenario();
     } else {
         $this->failedScenarios[] = $this->currentScenario;
         $this->currentFeature->addFailedScenario();
     }
     $this->currentScenario->setPassed($event->getTestResult()->isPassed());
     $this->currentFeature->addScenario($this->currentScenario);
 }
 public function afterOutline(AfterOutlineTested $event)
 {
     $this->scenarios[] = new OutlineScenario($event, $this->steps);
     $this->updateStats("scenarios", $event->getTestResult()->getResultCode());
     $this->steps = array();
 }
 /**
  * @param AfterOutlineTested $event
  */
 public function onAfterOutlineTested(AfterOutlineTested $event)
 {
     $scenarioPassed = $event->getTestResult()->isPassed();
     if ($scenarioPassed) {
         $this->passedScenarios[] = $this->currentScenario;
         $this->currentFeature->addPassedScenario();
     } else {
         //set screenshot properties
         $this->currentScenario->setScreenshotProperties($this->printer->getOutputPath(), 'assets/screenshots/', $event->getFeature()->getTitle());
         $this->failedScenarios[] = $this->currentScenario;
         $this->currentFeature->addFailedScenario();
     }
     $this->currentScenario->setLoopCount(sizeof($event->getTestResult()));
     $this->currentScenario->setPassed($event->getTestResult()->isPassed());
     $this->currentFeature->addScenario($this->currentScenario);
     $print = $this->renderer->renderAfterOutline($this);
     $this->printer->writeln($print);
 }