You are here

function ThrowPromiseSpec::it_throws_provided_exception in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php \spec\Prophecy\Promise\ThrowPromiseSpec::it_throws_provided_exception()

Parameters

\Prophecy\Prophecy\ObjectProphecy $object:

\Prophecy\Prophecy\MethodProphecy $method:

File

vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php, line 47

Class

ThrowPromiseSpec

Namespace

spec\Prophecy\Promise

Code

function it_throws_provided_exception($object, $method) {
  $this
    ->beConstructedWith($exc = new \RuntimeException('Some exception'));
  $this
    ->shouldThrow($exc)
    ->duringExecute(array(), $object, $method);
}