/** * Ensure that fixture customer and his addresses are deleted. */ protected function tearDown() { /** @var \Magento\Framework\Registry $registry */ $registry = Bootstrap::getObjectManager()->get('Magento\\Framework\\Registry'); $registry->unregister('isSecureArea'); $registry->register('isSecureArea', true); try { $fixtureFirstAddressId = 1; $this->addressRepository->deleteById($fixtureFirstAddressId); } catch (\Magento\Framework\Exception\NoSuchEntityException $e) { /** First address fixture was not used */ } try { $fixtureSecondAddressId = 2; $this->addressRepository->deleteById($fixtureSecondAddressId); } catch (\Magento\Framework\Exception\NoSuchEntityException $e) { /** Second address fixture was not used */ } try { $fixtureCustomerId = 1; $this->customerRepository->deleteById($fixtureCustomerId); } catch (\Magento\Framework\Exception\NoSuchEntityException $e) { /** Customer fixture was not used */ } $registry->unregister('isSecureArea'); $registry->register('isSecureArea', false); parent::tearDown(); }
protected function tearDown() { $this->deleteCart('test_order_1'); $this->deleteCart('test_order_1_with_payment'); $this->deleteCart('test_order_with_virtual_product'); $this->deleteCart('test_order_with_virtual_product_without_address'); parent::tearDown(); }
protected function tearDown() { parent::tearDown(); $this->_oAuthClients = []; if (isset(self::$_consumer)) { self::$_consumer->delete(); self::$_token->delete(); } }
protected function tearDown() { try { $cart = $this->getCart('test01'); $cart->delete(); } catch (\InvalidArgumentException $e) { // Do nothing if cart fixture was not used } parent::tearDown(); }
/** * Ensure that fixture customer and his addresses are deleted. */ public function tearDown() { unset($this->customerRepository); /** @var \Magento\Framework\Registry $registry */ $registry = Bootstrap::getObjectManager()->get('Magento\\Framework\\Registry'); $registry->unregister('isSecureArea'); $registry->register('isSecureArea', true); $registry->unregister('isSecureArea'); $registry->register('isSecureArea', false); parent::tearDown(); }
/** * Execute per test cleanup */ public function tearDown() { /** @var \Magento\Framework\Registry $registry */ $registry = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Framework\\Registry'); $registry->unregister('isSecureArea'); $registry->register('isSecureArea', true); $this->productCollection->addFieldToFilter('sku', ['in' => ['sku-test-product-bundle']])->delete(); unset($this->productCollection); $registry->unregister('isSecureArea'); $registry->register('isSecureArea', false); parent::tearDown(); }
protected function tearDown() { try { $cart = $this->getCart('test01'); $cart->delete(); /** @var \Magento\Quote\Model\QuoteIdMask $quoteIdMask */ $quoteIdMask = $this->objectManager->create('Magento\\Quote\\Model\\QuoteIdMask'); $quoteIdMask->delete($cart->getId()); } catch (\InvalidArgumentException $e) { // Do nothing if cart fixture was not used } parent::tearDown(); }
/** * Execute per test cleanup */ public function tearDown() { $this->deleteProductBySku(self::PRODUCT_SKU); parent::tearDown(); }
/** * Execute per test cleanup */ public function tearDown() { $this->deleteProductBySku(self::BUNDLE_PRODUCT_ID); parent::tearDown(); }
/** * Execute per test cleanup. */ public function tearDown() { parent::tearDown(); }
protected function tearDown() { unset($this->integration); OauthHelper::clearApiAccessCredentials(); parent::tearDown(); }