public function testAddAnswersOnTheFly() { $answer2 = Phake::mock('Phake_Stubber_IAnswer'); $answer3 = Phake::mock('Phake_Stubber_IAnswer'); $this->collection->addAnswer($answer2); $this->assertSame($this->answer, $this->collection->getAnswer()); $this->collection->addAnswer($answer3); $this->assertSame($answer2, $this->collection->getAnswer()); $this->assertSame($answer3, $this->collection->getAnswer()); }
/** * Binds a delegated call that will call a given method's parent while capturing that value to the passed in variable. * * @param mixed $captor * * @return Phake_Proxies_AnswerCollectionProxy */ public function captureReturnTo(&$captor) { $this->collection->addAnswer(new Phake_Stubber_Answers_ParentDelegate($captor)); return $this; }