src/Behat/Behat/EventDispatcher/Cli/StopOnFailureController.php
public function exitOnFailure(AfterScenarioTested $event)
    {
        if (!$this->resultInterpretation->isFailure($event->getTestResult())) {
            return;
        }

        $this->eventDispatcher->dispatch(SuiteTested::AFTER, new AfterSuiteAborted($event->getEnvironment()));
        $this->eventDispatcher->dispatch(ExerciseCompleted::AFTER, new AfterExerciseAborted());

        exit(1);
    }
public function exitOnFailure(AfterScenarioTested $event)
    {
        if (!$this->resultInterpretation->isFailure($event->getTestResult())) {
            return;
        }

        $this->eventDispatcher->dispatch(SuiteTested::AFTER, new AfterSuiteAborted($event->getEnvironment()));
        $this->eventDispatcher->dispatch(ExerciseCompleted::AFTER, new AfterExerciseAborted());

        exit(1);
    }
public function exitOnFailure ( AfterScenarioTested $ event ) { if ( ! $ this -> resultInterpretation -> isFailure ( $ event -> getTestResult ( ) ) ) { return ; } $ this -> eventDispatcher -> dispatch ( SuiteTested :: AFTER , new AfterSuiteAborted ( $ event -> getEnvironment ( ) ) ) ; $ this -> eventDispatcher -> dispatch ( ExerciseCompleted :: AFTER , new AfterExerciseAborted ( ) ) ; exit ( 1 ) ; }
Exits if scenario is a failure and if stopper is enabled.

@param AfterScenarioTested $event
Exits if scenario is a failure and if stopper is enabled .