Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
core_fixturestore_rollback.php
Go to the documentation of this file.
1 <?php
9 
11 $registry = $objectManager->get(\Magento\Framework\Registry::class);
12 
13 $registry->unregister('isSecureArea');
14 $registry->register('isSecureArea', true);
15 
17 $store = $objectManager->create(\Magento\Store\Model\Store::class);
18 $storeCode = 'fixturestore';
19 $store->load($storeCode);
20 if ($store->getId()) {
21  $store->delete();
22 }
23 
24 $registry->unregister('isSecureArea');
25 $registry->register('isSecureArea', false);