File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
dev/tests/integration/testsuite/Magento/Catalog/_files Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
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 );
You can’t perform that action at this time.
0 commit comments