/** * Execute per test cleanup. */ public function tearDown() { $this->customerSession->unsCustomerId(); /** @var \Magento\Customer\Model\CustomerRegistry $customerRegistry */ $customerRegistry = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Customer\\Model\\CustomerRegistry'); //Cleanup customer from registry $customerRegistry->remove(1); }
protected function tearDown() { $this->_customerSession->unsCustomerId(); /** @var \Magento\Customer\Model\CustomerRegistry $customerRegistry */ $customerRegistry = $this->objectManager->get('Magento\\Customer\\Model\\CustomerRegistry'); //Cleanup customer from registry $customerRegistry->remove(1); }
protected function tearDown() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->_customerSession->unsCustomerId(); $this->_context->getRequest()->setParam('id', $this->_requestId); /** @var \Magento\Customer\Model\AddressRegistry $addressRegistry */ $addressRegistry = $objectManager->get('Magento\\Customer\\Model\\AddressRegistry'); //Cleanup address from registry $addressRegistry->remove(1); $addressRegistry->remove(2); /** @var \Magento\Customer\Model\CustomerRegistry $customerRegistry */ $customerRegistry = $objectManager->get('Magento\\Customer\\Model\\CustomerRegistry'); //Cleanup customer from registry $customerRegistry->remove(1); }
protected function tearDown() { $this->_customerSession->unsCustomerId(); }
/** * Execute per test post cleanup. */ public function tearDown() { $this->customerSession->unsCustomerId(); }