/** * @dataProvider getRenewalExample */ public function testRenewalRate($rewed, $expired, $rate) { $this->repository->expects($this->at(0))->method('getCursor')->willReturn(new \ArrayObject($rewed)); $this->repository->expects($this->at(1))->method('getCursor')->willReturn(new \ArrayObject($expired)); $this->assertEquals($rate, $this->sut->getRenewalRate()); }