public function handleInvocation_ExpectationRepeatedTwice_returnExpectationsReturnValueTwice() { $myExpectation = new Expectation('foo'); $myExpectation->setReturn('foobar'); $myExpectation->setRepeat(2); $expectationsList = new ExpectationList(); $expectationsList->add($myExpectation); $this->expectationMap->put('foo', $expectationsList); $this->assertEquals($myExpectation->getReturn(), $this->sut->handleInvocation('foo', NULL)); $this->assertEquals($myExpectation->getReturn(), $this->sut->handleInvocation('foo', NULL)); $this->assertNull($this->sut->handleInvocation('foo', NULL)); }