12 use Magento\Catalog\Api\Data\ProductRender\FormattedPriceInfoInterfaceFactory;
20 private $priceCurrencyMock;
25 private $formattedPriceInfoFactoryMock;
30 private $formattedPriceInfoBuilderMock;
34 $this->priceCurrencyMock = $this->getMockBuilder(PriceCurrencyInterface::class)
35 ->getMockForAbstractClass();
36 $this->formattedPriceInfoFactoryMock = $this->getMockBuilder(FormattedPriceInfoInterfaceFactory::class)
37 ->disableOriginalConstructor()
41 $this->priceCurrencyMock,
42 $this->formattedPriceInfoFactoryMock
49 $storeCurrencyCode =
'USD';
51 $formattedPriceInfoInterfaceMock = $this->getMockBuilder(FormattedPriceInfoInterface::class)
52 ->disableOriginalConstructor()
53 ->setMethods([
'setData'])
54 ->getMockForAbstractClass();
55 $priceInfoMock = $this->getMockBuilder(PriceInfoInterface::class)
56 ->disableOriginalConstructor()
57 ->setMethods([
'getData'])
58 ->getMockForAbstractClass();
59 $priceInfoMock->expects($this->any())
64 $this->priceCurrencyMock->expects($this->atLeastOnce())
74 $formattedPriceInfoInterfaceMock->expects($this->atLeastOnce())
77 $this->formattedPriceInfoFactoryMock->expects($this->once())
79 ->willReturn($formattedPriceInfoInterfaceMock);
81 $this->formattedPriceInfoBuilderMock->build($priceInfoMock,
$storeId, $storeCurrencyCode);