src/Behat/Behat/Output/Node/EventListener/Statistics/ScenarioStatsListener.php
private function captureScenarioOrExampleStatsOnAfterEvent(Event $event)
    {
        if (!$event instanceof AfterScenarioTested) {
            return;
        }

        $scenario = $event->getScenario();
        $title = $scenario->getTitle();
        $path = sprintf('%s:%d', $this->currentFeaturePath, $scenario->getLine());
        $resultCode = $event->getTestResult()->getResultCode();

        $stat = new ScenarioStat($title, $path, $resultCode);
        $this->statistics->registerScenarioStat($stat);
    }
private function captureScenarioOrExampleStatsOnAfterEvent(Event $event)
    {
        if (!$event instanceof AfterScenarioTested) {
            return;
        }

        $scenario = $event->getScenario();
        $title = $scenario->getTitle();
        $path = sprintf('%s:%d', $this->currentFeaturePath, $scenario->getLine());
        $resultCode = $event->getTestResult()->getResultCode();

        $stat = new ScenarioStat($title, $path, $resultCode);
        $this->statistics->registerScenarioStat($stat);
    }
private function captureScenarioOrExampleStatsOnAfterEvent ( Event $ event ) { if ( ! $ event instanceof AfterScenarioTested ) { return ; } $ scenario = $ event -> getScenario ( ) ; $ title = $ scenario -> getTitle ( ) ; $ path = sprintf ( '%s:%d' , $ this -> currentFeaturePath , $ scenario -> getLine ( ) ) ; $ resultCode = $ event -> getTestResult ( ) -> getResultCode ( ) ; $ stat = new ScenarioStat ( $ title , $ path , $ resultCode ) ; $ this -> statistics -> registerScenarioStat ( $ stat ) ; }
Captures scenario or example stats on their AFTER event.

@param Event $event
Captures scenario or example stats on their AFTER event .