You are here

function RevealerSpec::it_reveals_instances_of_ProphecyInterface_inside_array in Zircon Profile 8

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

Parameters

\Prophecy\Prophecy\ProphecyInterface $prophecy1:

\Prophecy\Prophecy\ProphecyInterface $prophecy2:

\stdClass $object1:

\stdClass $object2:

File

vendor/phpspec/prophecy/spec/Prophecy/Prophecy/RevealerSpec.php, line 31

Class

RevealerSpec

Namespace

spec\Prophecy\Prophecy

Code

function it_reveals_instances_of_ProphecyInterface_inside_array($prophecy1, $prophecy2, $object1, $object2) {
  $prophecy1
    ->reveal()
    ->willReturn($object1);
  $prophecy2
    ->reveal()
    ->willReturn($object2);
  $this
    ->reveal(array(
    array(
      'item' => $prophecy2,
    ),
    $prophecy1,
  ))
    ->shouldReturn(array(
    array(
      'item' => $object2,
    ),
    $object1,
  ));
}