Skip to content

Commit c91f2c7

Browse files
committed
ACP2E-1345, CR
1 parent fd7b55b commit c91f2c7

File tree

1 file changed

+6
-23
lines changed

1 file changed

+6
-23
lines changed

app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -40,29 +40,12 @@ protected function setUp(): void
4040

4141
public function testSaveSelectionPrice()
4242
{
43-
$item = $this->getMockBuilder(Selection::class)
44-
->disableOriginalConstructor()
45-
->addMethods([
46-
'getSelectionId',
47-
'getWebsiteId',
48-
'getSelectionPriceType',
49-
'getSelectionPriceValue',
50-
'getParentProductId',
51-
'getDefaultPriceScope'])
52-
->getMock();
53-
$values = [
54-
'selection_id' => 1,
55-
'website_id' => 1,
56-
'selection_price_type' => null,
57-
'selection_price_value' => null,
58-
'parent_product_id' => 1,
59-
];
60-
$item->expects($this->once())->method('getDefaultPriceScope')->willReturn(false);
61-
$item->expects($this->once())->method('getSelectionId')->willReturn($values['selection_id']);
62-
$item->expects($this->once())->method('getWebsiteId')->willReturn($values['website_id']);
63-
$item->expects($this->once())->method('getSelectionPriceType')->willReturn($values['selection_price_type']);
64-
$item->expects($this->once())->method('getSelectionPriceValue')->willReturn($values['selection_price_value']);
65-
$item->expects($this->once())->method('getParentProductId')->willReturn($values['parent_product_id']);
43+
$item = new Selection(
44+
$this->createMock(\Magento\Framework\Model\Context::class),
45+
$this->createMock(\Magento\Framework\Registry::class),
46+
$this->createMock(\Magento\Catalog\Helper\Data::class),
47+
$this->createMock(\Magento\Bundle\Model\ResourceModel\Selection::class)
48+
);
6649

6750
$connection = $this->createMock(AdapterInterface::class);
6851
$connection->expects($this->once())

0 commit comments

Comments
 (0)