PhpSpec\Listener\StopOnFailureListener::afterExample PHP Method

afterExample() public method

public afterExample ( ExampleEvent $event )
$event PhpSpec\Event\ExampleEvent
    public function afterExample(ExampleEvent $event)
    {
        if (!$this->io->isStopOnFailureEnabled()) {
            return;
        }
        if ($event->getResult() === ExampleEvent::FAILED || $event->getResult() === ExampleEvent::BROKEN) {
            throw new StopOnFailureException('Example failed', 0, null, $event->getResult());
        }
    }