src/Behat/Behat/Output/Node/EventListener/JUnit/JUnitFeatureElementListener.php
public function printFeatureOnAfterEvent(Formatter $formatter, Event $event)
    {
        if (!$event instanceof AfterFeatureTested) {
            return;
        }

        $this->featurePrinter->printHeader($formatter, $this->beforeFeatureTestedEvent);

        foreach ($this->afterScenarioTestedEvents as $afterScenario) {
            $afterScenarioTested = $afterScenario['event'];
            $this->scenarioPrinter->printOpenTag($formatter, $afterScenarioTested->getFeature(), $afterScenarioTested->getScenario(), $afterScenarioTested->getTestResult());

            /** @var AfterStepSetup $afterStepSetup */
            foreach ($afterScenario['step_setup_events'] as $afterStepSetup) {
                $this->setupPrinter->printSetup($formatter, $afterStepSetup->getSetup());
            }
            foreach ($afterScenario['step_events'] as $afterStepTested) {
                $this->stepPrinter->printStep($formatter, $afterScenarioTested->getScenario(), $afterStepTested->getStep(), $afterStepTested->getTestResult());
                $this->setupPrinter->printTeardown($formatter, $afterStepTested->getTeardown());
            }
        }

        $this->featurePrinter->printFooter($formatter, $event->getTestResult());
        $this->afterScenarioTestedEvents = array();
    }
public function printFeatureOnAfterEvent(Formatter $formatter, Event $event)
    {
        if (!$event instanceof AfterFeatureTested) {
            return;
        }

        $this->featurePrinter->printHeader($formatter, $this->beforeFeatureTestedEvent);

        foreach ($this->afterScenarioTestedEvents as $afterScenario) {
            $afterScenarioTested = $afterScenario['event'];
            $this->scenarioPrinter->printOpenTag($formatter, $afterScenarioTested->getFeature(), $afterScenarioTested->getScenario(), $afterScenarioTested->getTestResult());

            /** @var AfterStepSetup $afterStepSetup */
            foreach ($afterScenario['step_setup_events'] as $afterStepSetup) {
                $this->setupPrinter->printSetup($formatter, $afterStepSetup->getSetup());
            }
            foreach ($afterScenario['step_events'] as $afterStepTested) {
                $this->stepPrinter->printStep($formatter, $afterScenarioTested->getScenario(), $afterStepTested->getStep(), $afterStepTested->getTestResult());
                $this->setupPrinter->printTeardown($formatter, $afterStepTested->getTeardown());
            }
        }

        $this->featurePrinter->printFooter($formatter, $event->getTestResult());
        $this->afterScenarioTestedEvents = array();
    }
public function printFeatureOnAfterEvent ( Formatter $ formatter , Event $ event ) { if ( ! $ event instanceof AfterFeatureTested ) { return ; } $ this -> featurePrinter -> printHeader ( $ formatter , $ this -> beforeFeatureTestedEvent ) ; foreach ( $ this -> afterScenarioTestedEvents as $ afterScenario ) { $ afterScenarioTested = $ afterScenario [ 'event' ] ; $ this -> scenarioPrinter -> printOpenTag ( $ formatter , $ afterScenarioTested -> getFeature ( ) , $ afterScenarioTested -> getScenario ( ) , $ afterScenarioTested -> getTestResult ( ) ) ; /** @var AfterStepSetup $afterStepSetup */ foreach ( $ afterScenario [ 'step_setup_events' ] as $ afterStepSetup ) { $ this -> setupPrinter -> printSetup ( $ formatter , $ afterStepSetup -> getSetup ( ) ) ; } foreach ( $ afterScenario [ 'step_events' ] as $ afterStepTested ) { $ this -> stepPrinter -> printStep ( $ formatter , $ afterScenarioTested -> getScenario ( ) , $ afterStepTested -> getStep ( ) , $ afterStepTested -> getTestResult ( ) ) ; $ this -> setupPrinter -> printTeardown ( $ formatter , $ afterStepTested -> getTeardown ( ) ) ; } } $ this -> featurePrinter -> printFooter ( $ formatter , $ event -> getTestResult ( ) ) ; $ this -> afterScenarioTestedEvents = array ( ) ; }
Prints the feature on AFTER event.

@param Formatter $formatter
@param Event     $event
Prints the feature on AFTER event .