Behat\Behat\EventDispatcher\Cli\StopOnFailureController::exitOnFailure PHP Method

exitOnFailure() public method

Exits if scenario is a failure and if stopper is enabled.
public exitOnFailure ( Behat\Behat\EventDispatcher\Event\AfterScenarioTested $event )
$event Behat\Behat\EventDispatcher\Event\AfterScenarioTested
    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);
    }