/** * @dataProvider getConversionExample */ public function testGetConversionRate($converted, $nonconverted, $rate) { $this->repository->expects($this->at(0))->method('getCursor')->willReturn(new \ArrayObject($converted)); $this->repository->expects($this->at(1))->method('getCursor')->willReturn(new \ArrayObject($nonconverted)); $this->assertEquals($rate, $this->sut->getConversionRate()); }