Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
subscribers_rollback.php
Go to the documentation of this file.
1 <?php
7 
9 $registry = $objectManager->get(\Magento\Framework\Registry::class);
10 
11 $registry->unregister('isSecureArea');
12 $registry->register('isSecureArea', true);
13 
15 $subscriberCollection = $objectManager->get(\Magento\Newsletter\Model\ResourceModel\Subscriber\Collection::class);
18  $subscriber->delete();
19 }
20 
21 $registry->unregister('isSecureArea');
22 $registry->register('isSecureArea', false);
23 
24 require __DIR__ . '/../../../Magento/Customer/_files/customer_rollback.php';
25 require __DIR__ . '/../../../Magento/Store/_files/core_fixturestore_rollback.php';
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60
$subscriber
Definition: subscribers.php:20
$subscriberCollection