Skip to content

Commit 2bc1ff2

Browse files
committed
ACP2E-1456: fix unit test errors
1 parent 9c8e7be commit 2bc1ff2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ class ConfigurationTest extends TestCase
5757
*/
5858
private $serializer;
5959

60+
/**
61+
* @var \Magento\Catalog\Helper\Data|MockObject
62+
*/
63+
private $catalogHelper;
64+
6065
/**
6166
* @inheritDoc
6267
*/
@@ -72,6 +77,7 @@ protected function setUp(): void
7277
$this->serializer = $this->getMockBuilder(Json::class)
7378
->onlyMethods(['unserialize'])
7479
->getMockForAbstractClass();
80+
$this->catalogHelper = $this->createPartialMock(\Magento\Catalog\Helper\Data::class, ['getTaxPrice']);
7581

7682
$this->serializer->expects($this->any())
7783
->method('unserialize')
@@ -87,7 +93,8 @@ function ($value) {
8793
'pricingHelper' => $this->pricingHelper,
8894
'productConfiguration' => $this->productConfiguration,
8995
'escaper' => $this->escaper,
90-
'serializer' => $this->serializer
96+
'serializer' => $this->serializer,
97+
'catalogHelper' => $this->catalogHelper
9198
]
9299
);
93100
}
@@ -149,7 +156,8 @@ public function testGetSelectionFinalPrice(): void
149156
$price->expects($this->once())->method('getSelectionFinalTotalPrice')
150157
->with($product, $selectionProduct, $itemQty, 0, false, true);
151158

152-
$this->helper->getSelectionFinalPrice($this->item, $selectionProduct);
159+
$selectionPrice = $this->helper->getSelectionFinalPrice($this->item, $selectionProduct);
160+
$this->catalogHelper->getTaxPrice($selectionProduct, $selectionPrice);
153161
}
154162

155163
/**

0 commit comments

Comments
 (0)