PhpSpec\Event\ExampleEvent::getException PHP Method

getException() public method

public getException ( ) : Exception
return Exception
    public function getException()
    {
        return $this->exception;
    }

Usage Example

 function it_does_not_prompt_to_generate_when_there_was_an_exception_of_the_wrong_type(IO $io, ExampleEvent $exampleEvent, SuiteEvent $suiteEvent, \InvalidArgumentException $otherException)
 {
     $exampleEvent->getException()->willReturn($otherException);
     $this->afterExample($exampleEvent);
     $this->afterSuite($suiteEvent);
     $io->askConfirmation(Argument::any())->shouldNotHaveBeenCalled();
 }
All Usage Examples Of PhpSpec\Event\ExampleEvent::getException