Skip to content

Commit 8b33721

Browse files
author
Sergii Kovalenko
committed
MAGETWO-56062: [Github #3890] Recently Viewed Products block does not appear when FPC is enabled
--get_value test assertion add
1 parent a62a889 commit 8b33721

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

app/code/Magento/GroupedProduct/Test/Unit/Pricing/Price/FinalPriceTest.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,27 @@ public function testGetValue()
103103
$this->assertEquals(10, $this->finalPrice->getValue());
104104
}
105105

106+
public function testGetValueWithoutMinProduct()
107+
{
108+
$typeInstanceMock = $this->getMock(
109+
\Magento\GroupedProduct\Model\Product\Type\Grouped::class,
110+
[],
111+
[],
112+
'',
113+
false
114+
);
115+
$typeInstanceMock->expects($this->once())
116+
->method('getAssociatedProducts')
117+
->with($this->equalTo($this->saleableItemMock))
118+
->will($this->returnValue([]));
119+
120+
$this->saleableItemMock->expects($this->once())
121+
->method('getTypeInstance')
122+
->will($this->returnValue($typeInstanceMock));
123+
124+
$this->assertEquals(0.00, $this->finalPrice->getValue());
125+
}
126+
106127
protected function getProductMock($price)
107128
{
108129
$priceTypeMock = $this->getMock(\Magento\Catalog\Pricing\Price\FinalPrice::class, [], [], '', false);

0 commit comments

Comments
 (0)