Skip to content

Commit 85ffb60

Browse files
authored
Update getValueFromData test
1 parent 9f9c76f commit 85ffb60

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

app/code/Magento/CatalogRule/Test/Unit/Pricing/Price/CatalogRulePriceTest.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,20 @@ public function testGetValue()
208208

209209
public function testGetValueFromData()
210210
{
211+
$catalogRulePrice = 7.1;
212+
$convertedPrice = 5.84;
213+
214+
$this->priceCurrencyMock->expects($this->any())
215+
->method('convertAndRound')
216+
->with($catalogRulePrice)
217+
->will($this->returnValue($convertedPrice));
218+
211219
$this->saleableItemMock->expects($this->once())->method('hasData')
212220
->with('catalog_rule_price')->willReturn(true);
213221
$this->saleableItemMock->expects($this->once())->method('getData')
214-
->with('catalog_rule_price')->willReturn('7.1');
222+
->with('catalog_rule_price')->willReturn($catalogRulePrice);
215223

216-
$this->assertEquals(7.1, $this->object->getValue());
224+
$this->assertEquals($convertedPrice, $this->object->getValue());
217225
}
218226

219227
public function testGetAmountNoBaseAmount()

0 commit comments

Comments
 (0)