Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 77aa5a0

Browse files
committed
#101: setIsDuplicate(true) to ensure cloned products get valid SKUs.
1 parent 5368e01 commit 77aa5a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,11 @@ protected function prepareProducts()
137137

138138
$this->product->setStoreId(0)->setData('test_attribute', 'test_attribute_value')->save();
139139
$this->productSecond = clone $this->product;
140-
$this->productSecond->setId(null)->setUrlKey('product-second')->save();
140+
$this->productSecond->setId(null)->setUrlKey('product-second')->setIsDuplicate(true)->save();
141141
$this->productThird = clone $this->product;
142142
$this->productThird->setId(null)
143143
->setUrlKey('product-third')
144+
->setIsDuplicate(true)
144145
->setData('test_attribute', 'NO_test_attribute_value')
145146
->save();
146147
}

0 commit comments

Comments
 (0)