You are here

function MethodProphecySpec::it_adds_ThrowPromise_during_willThrow_call in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php \spec\Prophecy\Prophecy\MethodProphecySpec::it_adds_ThrowPromise_during_willThrow_call()

File

vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php, line 97

Class

MethodProphecySpec

Namespace

spec\Prophecy\Prophecy

Code

function it_adds_ThrowPromise_during_willThrow_call($objectProphecy) {
  $objectProphecy
    ->addMethodProphecy($this)
    ->willReturn(null);
  $this
    ->willThrow('RuntimeException');
  $this
    ->getPromise()
    ->shouldBeAnInstanceOf('Prophecy\\Promise\\ThrowPromise');
}