Skip to content

Commit 9baccc7

Browse files
committed
MAGETWO-67087: Saving category deletes url-rewrites for products in anchor categories
1 parent 0d3e766 commit 9baccc7

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/Model/CategoryUrlRewriteGeneratorTest.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,6 @@ public function testGenerateUrlRewritesWithoutSaveHistory()
8686
'catalog/product/view/id/' . $productForTest . '/category/4',
8787
1,
8888
0
89-
],
90-
[
91-
'/simple-product-two.html',
92-
'catalog/product/view/id/' . $productForTest . '/category/2',
93-
1,
94-
0
9589
]
9690
];
9791

@@ -174,12 +168,6 @@ public function testGenerateUrlRewritesWithSaveHistory()
174168
1,
175169
0
176170
],
177-
[
178-
'/simple-product-two.html',
179-
'catalog/product/view/id/' . $productForTest . '/category/2',
180-
1,
181-
0
182-
],
183171
[
184172
'category-1/simple-product-two.html',
185173
'new-url/simple-product-two.html',

dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/categories_with_products.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
4343
->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
4444
->save();
45-
$categoryLinkManagement->assignProductToCategories($product->getSku(), [2, 3, 4]);
45+
$categoryLinkManagement->assignProductToCategories($product->getSku(), [3, 4]);
4646

4747
$product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Catalog\Model\Product::class);
4848
$product->setTypeId(\Magento\Catalog\Model\Product\Type::TYPE_SIMPLE)

0 commit comments

Comments
 (0)