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()); }
/** * Returns an answer from the container * @return Phake_Stubber_IAnswer */ public function getAnswer() { return $this->collection->getAnswer(); }