/** * @param AfterFeatureTested $event */ public function onAfterFeatureTested(AfterFeatureTested $event) { $this->currentSuite->addFeature($this->currentFeature); if ($this->currentFeature->allPassed()) { $this->passedFeatures[] = $this->currentFeature; } else { $this->failedFeatures[] = $this->currentFeature; } $print = $this->renderer->renderAfterFeature($this); $this->printer->writeln($print); }
/** * @param AfterFeatureTested $event */ public function onAfterFeatureTested(AfterFeatureTested $event) { $this->currentSuite->addFeature($this->currentFeature); if ($this->currentFeature->allPassed()) { $this->passedFeatures[] = $this->currentFeature; } else { $this->failedFeatures[] = $this->currentFeature; } $this->currentFeature->getPercentPassed(); $print = $this->renderer->renderAfterFeature($this); /*Old logic*/ /*$this->printer->writeln($print);*/ /*New logic*/ //$featureName = $this->getCurrentFeature()->getName(); $featureName = $this->getCurrentFeature()->getFileName(); $this->printer->featureWriteln($print, $featureName); }