Skip to content

Commit ffdf57e

Browse files
committed
MAGETWO-74021: "Catalog Products List" widget does not displays on frontend
1 parent 4ff294b commit ffdf57e

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
/**
8+
* Remove all products as strategy of isolation process
9+
*/
10+
$registry = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\Registry');
11+
$registry->unregister('isSecureArea');
12+
$registry->register('isSecureArea', true);
13+
14+
/** @var $productCollection \Magento\Catalog\Model\ResourceModel\Product */
15+
$productCollection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
16+
->create('Magento\Catalog\Model\Product')
17+
->getCollection();
18+
19+
foreach ($productCollection as $product) {
20+
$product->delete();
21+
}
22+
23+
$registry->unregister('isSecureArea');
24+
$registry->register('isSecureArea', false);

0 commit comments

Comments
 (0)