19 private $priceCurrencyMock;
23 $this->priceCurrencyMock = $this->getMockBuilder(\
Magento\Framework\Pricing\PriceCurrencyInterface::class)
24 ->disableOriginalConstructor()
26 $this->model = new \Magento\CatalogRule\Model\Indexer\ProductPriceCalculator($this->priceCurrencyMock);
34 'action_operator' =>
'to_fixed',
35 'action_amount' => $actionAmount
39 $this->priceCurrencyMock->expects($this->once())
42 ->willReturn($actionAmount);
53 'action_operator' =>
'to_percent',
54 'action_amount' => $actionAmount
58 $this->priceCurrencyMock->expects($this->once())
60 ->with($expectedPrice)
61 ->willReturn($expectedPrice);
72 'action_operator' =>
'by_fixed',
73 'action_amount' => $actionAmount
77 $this->priceCurrencyMock->expects($this->once())
79 ->with($expectedPrice)
80 ->willReturn($expectedPrice);
91 'action_operator' =>
'by_percent',
92 'action_amount' => $actionAmount
96 $this->priceCurrencyMock->expects($this->once())
98 ->with($expectedPrice)
99 ->willReturn($expectedPrice);
testCalculateToFixedPrice()
testCalculateByFixedPrice()
testCalculateByPercentPrice()
testCalculateToPercentPrice()