You are here

function CallbackPromiseSpec::it_should_execute_instance_array_callback in Zircon Profile 8

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

Parameters

\Prophecy\Prophecy\ObjectProphecy $object:

\Prophecy\Prophecy\MethodProphecy $method:

File

vendor/phpspec/prophecy/spec/Prophecy/Promise/CallbackPromiseSpec.php, line 51

Class

CallbackPromiseSpec

Namespace

spec\Prophecy\Promise

Code

function it_should_execute_instance_array_callback($object, $method) {
  $class = new ClassCallback();
  $firstArgumentCallback = array(
    $class,
    'callbackMethod',
  );
  $this
    ->beConstructedWith($firstArgumentCallback);
  $this
    ->execute(array(
    'one',
    'two',
  ), $object, $method)
    ->shouldReturn('one');
}