/** * @param BeforeOutlineTested $event */ public function onBeforeOutlineTested(BeforeOutlineTested $event) { $scenario = new Scenario(); $scenario->setName($event->getOutline()->getTitle()); $scenario->setTags($event->getOutline()->getTags()); $scenario->setLine($event->getOutline()->getLine()); $this->currentScenario = $scenario; $print = $this->renderer->renderBeforeOutline($this); $this->printer->writeln($print); }
/** * @param BeforeOutlineTested $event */ public function onBeforeOutlineTested(BeforeOutlineTested $event) { $scenario = new Scenario(); $scenarioOutlineName = $event->getOutline()->getTitle(); $scenarioOutlineType = $event->getOutline()->getKeyword(); $scenario->setName($scenarioOutlineName); $scenario->setTags($event->getOutline()->getTags()); $scenario->setLine($event->getOutline()->getLine()); $this->currentScenarioOutline = $scenarioOutlineName; $this->currentScenarioType = $scenarioOutlineType; $this->currentScenario = $scenario; $print = $this->renderer->renderBeforeOutline($this); /*Old logic*/ /*$this->printer->writeln($print);*/ /*New logic*/ //$featureName = $this->getCurrentFeature()->getName(); $featureName = $this->getCurrentFeature()->getFileName(); $this->printer->featureWriteln($print, $featureName); }