Skip to content

Commit 58677ab

Browse files
author
Aliaksei Yakimovich2
committed
MAGETWO-60918: Fatal error on Import/Export page if deleted category ids exists in category path
- Fixed static test;
1 parent 30b2213 commit 58677ab

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_with_broken_categories_path_rollback.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,8 @@
1616
/** @var \Magento\Catalog\Api\ProductRepositoryInterface $productRepository */
1717
$productRepository = $objectManager->create(\Magento\Catalog\Api\ProductRepositoryInterface::class);
1818

19-
try {
20-
$product = $productRepository->get('simple', false, null, true);
21-
$productRepository->delete($product);
22-
} catch (\Magento\Framework\Exception\NoSuchEntityException $e) {
23-
//Product already removed
24-
}
19+
$product = $productRepository->get('simple', false, null, true);
20+
$productRepository->delete($product);
2521

2622
//Remove categories
2723
/** @var Magento\Catalog\Model\ResourceModel\Category\Collection $collection */

0 commit comments

Comments
 (0)