/**
  * @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);
 }
 /**
  * @param Node\Feature $feature
  *
  * @return array
  */
 protected function processFeature(Node\Feature $feature)
 {
     $currentFeature = ['uri' => $feature->getUri(), 'id' => $feature->getId(), 'tags' => $feature->getTags() ? $this->processTags($feature->getTags()) : [], 'keyword' => $feature->getKeyword(), 'name' => $feature->getName(), 'line' => $feature->getLine(), 'description' => $feature->getDescription(), 'elements' => []];
     if (is_array($feature->getScenarios())) {
         foreach ($feature->getScenarios() as $scenario) {
             array_push($currentFeature['elements'], $this->processScenario($scenario));
         }
     }
     return $currentFeature;
 }