public function getNext_SameExpectationTwice_whenRepeatIs2()
 {
     $expect = new Expectation('method');
     $expect->setRepeat(2);
     $this->sut->add($expect);
     $this->assertEquals($expect, $this->sut->getNext([]));
     $this->assertEquals($expect, $this->sut->getNext([]));
     $this->assertNull($this->sut->getNext([]));
 }
 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));
 }