/** * @param \Prophecy\Doubler\Doubler $doubler * @param \Prophecy\Prophecy\ProphecySubjectInterface $double */ function let($doubler, $double) { $doubler->double(null, array())->willReturn($double); $this->beConstructedWith($doubler); }
/** * @param \Prophecy\Doubler\Doubler $doubler * @param \Prophecy\Prophecy\ProphecySubjectInterface $reflection */ function it_returns_new_MethodProphecy_for_different_signatures($doubler, $reflection) { $doubler->double(Argument::any())->willReturn($reflection); $this->addMethodProphecy($methodProphecy1 = $this->getProphecy(3, 2, 1)); $methodProphecy2 = $this->getProphecy(1, 2, 3); $methodProphecy2->shouldNotBe($methodProphecy1); }
function it_returns_new_MethodProphecy_for_all_callback_signatures(Doubler $doubler, ProphecySubjectInterface $reflection) { $doubler->double(Argument::any())->willReturn($reflection); $this->addMethodProphecy($methodProphecy1 = $this->getProphecy(function () { })); $methodProphecy2 = $this->getProphecy(function () { }); $methodProphecy2->shouldNotBe($methodProphecy1); }
/** * @param \Prophecy\Doubler\Doubler $doubler * @param \Prophecy\Prophecy\ProphecySubjectInterface $reflection */ function it_returns_new_MethodProphecy_for_different_signatures($doubler, $reflection) { $doubler->double(Argument::any())->willReturn($reflection); $value = new ObjectProphecySpecFixtureB('ABC'); $value2 = new ObjectProphecySpecFixtureB('CBA'); $this->addMethodProphecy($methodProphecy1 = $this->getProphecy(1, 2, 3, $value)); $methodProphecy2 = $this->getProphecy(1, 2, 3, $value2); $methodProphecy2->shouldNotBe($methodProphecy1); }
function let(Doubler $doubler, ProphecySubjectInterface $double) { $doubler->double(null, array())->willReturn($double); $this->beConstructedWith($doubler); }