Skip to content

Commit fb6604b

Browse files
author
Aliaksei Yakimovich2
committed
Issue magento#15656: Duplicate product
- Fixed static and unit tests;
1 parent 98d68ee commit fb6604b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

app/code/Magento/Catalog/Model/Product/Copier.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ class Copier
5050
/**
5151
* @param CopyConstructorInterface $copyConstructor
5252
* @param \Magento\Catalog\Model\ProductFactory $productFactory
53+
* @param ProductRepositoryInterface|null $productRepository
5354
*/
5455
public function __construct(
5556
CopyConstructorInterface $copyConstructor,

app/code/Magento/Catalog/Test/Unit/Model/Product/CopierTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ public function testCopy()
101101
'product data' => ['product data'],
102102
ProductInterface::EXTENSION_ATTRIBUTES_KEY => $extensionAttributes,
103103
];
104+
105+
$this->productMock->expects($this->once())->method('getStoreId')->willReturn(0);
104106
$this->productMock->expects($this->atLeastOnce())->method('getWebsiteIds');
105107
$this->productMock->expects($this->atLeastOnce())->method('getCategoryIds');
106108
$this->productMock->expects($this->any())->method('getData')->willReturnMap([

0 commit comments

Comments
 (0)