Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
magento2-base
dev
tests
integration
testsuite
Magento
Catalog
_files
product_simple_with_all_fields_rollback.php
Go to the documentation of this file.
1
<?php
8
include
__DIR__
.
'/product_simple_rollback.php'
;
9
10
11
$objectManager
=
\Magento\TestFramework\Helper\Bootstrap::getObjectManager
();
13
$registry
=
$objectManager
->get(\
Magento
\Framework\Registry::class);
14
15
$registry
->unregister(
'isSecureArea'
);
16
$registry
->register(
'isSecureArea'
,
true
);
17
18
//Remove categories
20
$collection
=
$objectManager
->create(\
Magento
\Catalog\Model\
ResourceModel
\Category\Collection::class);
21
foreach
(
$collection
->addAttributeToFilter(
'level'
, [
'in'
=> [2, 3, 4]]) as
$category
) {
23
$category
->delete();
24
}
25
26
$registry
->unregister(
'isSecureArea'
);
27
$registry
->register(
'isSecureArea'
,
false
);
$category
$category
Definition:
catalog_category_with_slash.php:7
Magento\Catalog\Model\ResourceModel\Product
Definition:
CollectionTest.php:6
$objectManager
$objectManager
Definition:
product_simple_with_all_fields_rollback.php:11
__DIR__
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition:
_bootstrap.php:60
$registry
$registry
Definition:
product_simple_with_all_fields_rollback.php:13
$collection
$collection
Definition:
product_simple_with_all_fields_rollback.php:20
Magento
Magento\TestFramework\Helper\Bootstrap\getObjectManager
static getObjectManager()
Definition:
Bootstrap.php:125