function it_adds_itself_to_ObjectProphecy_during_call_to_will(PromiseInterface $objectProphecy, $promise) { $objectProphecy->addMethodProphecy($this)->shouldBeCalled(); $this->will($promise); }