Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
core_second_third_fixturestore_rollback.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
10 
11 $registry->unregister('isSecureArea');
12 $registry->register('isSecureArea', true);
13 
16 $websiteId = $website->load('secondwebsite', 'code')->getId();
17 if ($websiteId) {
18  $website->delete();
19 }
21 if ($store->load('secondstore', 'code')->getId()) {
22  $store->delete();
23 }
24 
26 $websiteId = $website->load('thirdwebsite', 'code')->getId();
27 if ($websiteId) {
28  $website->delete();
29 }
30 
31 $store = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Store\Model\Store::class);
32 if ($store->load('thirdstore', 'code')->getId()) {
33  $store->delete();
34 }
35 
36 $registry->unregister('isSecureArea');
37 $registry->register('isSecureArea', false);