/**
  * @param BeforeFeatureTested $event
  */
 public function onBeforeFeatureTested(BeforeFeatureTested $event)
 {
     $feature = new Feature();
     $feature->setId($this->featureCounter);
     $this->featureCounter++;
     $feature->setName($event->getFeature()->getTitle());
     $feature->setDescription($event->getFeature()->getDescription());
     $feature->setTags($event->getFeature()->getTags());
     $feature->setFile($event->getFeature()->getFile());
     $feature->setScreenshotName($event->getFeature()->getFile());
     $this->currentFeature = $feature;
     $print = $this->renderer->renderBeforeFeature($this);
     $this->printer->writeln($print);
 }
 /**
  * @param BeforeFeatureTested $event
  */
 public function onBeforeFeatureTested(BeforeFeatureTested $event)
 {
     $feature = new Feature();
     $feature->setId($this->featureCounter);
     $this->featureCounter++;
     $feature->setName($event->getFeature()->getTitle());
     $feature->setDescription($event->getFeature()->getDescription());
     $feature->setTags($event->getFeature()->getTags());
     $feature->setFile($event->getFeature()->getFile());
     //$feature->setScreenshotFolder($event->getFeature()->getTitle());
     /*Set feature name as file name*/
     $feature->setFileName($event->getFeature()->getFile());
     $featureName = $feature->getFileName();
     $feature->setScreenshotFolder($featureName);
     $this->currentFeature = $feature;
     /*Old logic*/
     /*      $print = $this->renderer->renderBeforeFeature($this);
             $this->printer->writeln($print);*/
     /*New logic*/
     $printBeforeExercise = $this->renderer->renderBeforeExercise($this);
     $printBeforeSuite = $this->renderer->renderBeforeSuite($this);
     $print = $this->renderer->renderBeforeFeature($this);
     //$featureName = $this->getCurrentFeature()->getName();
     $this->printer->featureWriteln($printBeforeExercise, $featureName);
     $this->printer->featureWriteln($printBeforeSuite, $featureName);
     $this->printer->featureWriteln($print, $featureName);
 }