/** * @dataProvider getOutputFormatDataProvider * @param $withCurrency * @param $noCurrency * @param $expected */ public function testGetOutputFormat($withCurrency, $noCurrency, $expected) { $currencyMock = $this->getMockBuilder('\\Magento\\Framework\\Currency')->disableOriginalConstructor()->getMock(); $currencyMock->expects($this->at(0))->method('toCurrency')->willReturn($withCurrency); $currencyMock->expects($this->at(1))->method('toCurrency')->willReturn($noCurrency); $this->localeCurrencyMock->expects($this->atLeastOnce())->method('getCurrency')->with($this->currencyCode)->willReturn($currencyMock); $this->assertEquals($expected, $this->currency->getOutputFormat()); }