protected function setUp() { parent::setUp(); $quote = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Sales\\Model\\Quote'); $quote->load('test01', 'reserved_order_id'); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Checkout\\Model\\Session')->setQuoteId($quote->getId()); }
protected function setUp() { /* Called getConfig as workaround for setConfig bug */ \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Store\\Model\\StoreManagerInterface')->getStore('default')->getConfig('dev/translate_inline/active'); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Framework\\App\\Config\\MutableScopeConfigInterface')->setValue('dev/translate_inline/active', true, \Magento\Store\Model\ScopeInterface::SCOPE_STORE, 'default'); parent::setUp(); }
protected function setUp() { if (defined('HHVM_VERSION')) { $this->markTestSkipped('Randomly fails due to known HHVM bug (DOMText mixed with DOMElement)'); } parent::setUp(); }
protected function setUp() { parent::setUp(); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->productRepository = $objectManager->create('Magento\\Catalog\\Model\\ProductRepository'); }
/** * Execute per test initialization. */ public function setUp() { parent::setUp(); $this->layout = Bootstrap::getObjectManager()->get('Magento\\Framework\\View\\LayoutInterface'); $this->customerGroupService = Bootstrap::getObjectManager()->create('Magento\\Customer\\Service\\V1\\CustomerGroupService'); $this->registry = Bootstrap::getObjectManager()->get('Magento\\Framework\\Registry'); }
/** * Execute per test initialization. */ public function setUp() { parent::setUp(); $this->layout = Bootstrap::getObjectManager()->get('Magento\\Framework\\View\\LayoutInterface'); $this->groupRepository = Bootstrap::getObjectManager()->create('Magento\\Customer\\Api\\GroupRepositoryInterface'); $this->groupManagement = Bootstrap::getObjectManager()->create('Magento\\Customer\\Api\\GroupManagementInterface'); $this->registry = Bootstrap::getObjectManager()->get('Magento\\Framework\\Registry'); }
protected function setUp() { parent::setUp(); $logger = $this->getMock('Psr\\Log\\LoggerInterface', [], [], '', false); $session = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Customer\\Model\\Session', [$logger]); $this->accountManagement = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Customer\\Api\\AccountManagementInterface'); $customer = $this->accountManagement->authenticate('*****@*****.**', 'password'); $session->setCustomerDataAsLoggedIn($customer); }
protected function setUp() { parent::setUp(); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->customerSession = $objectManager->get('Magento\\Customer\\Model\\Session'); $this->customerSession->setCustomerId(1); $this->coreSession = $objectManager->get('Magento\\Framework\\Session\\Generic'); $this->coreSession->setData('_form_key', 'formKey'); }
/** * @inheritdoc */ public function setUp() { parent::setUp(); $this->quote = $this->_objectManager->create('Magento\\Quote\\Model\\Quote'); $this->checkoutSession = $this->_objectManager->get('Magento\\Checkout\\Model\\Session'); $this->quote->load('test01', 'reserved_order_id'); $this->checkoutSession->setQuoteId($this->quote->getId()); $this->checkoutSession->setCartWasUpdated(false); }
protected function setUp() { parent::setUp(); $logger = $this->getMock('Magento\\Framework\\Logger', array(), array(), '', false); $session = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Customer\\Model\\Session', array($logger)); $service = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Customer\\Service\\V1\\CustomerAccountService'); $customer = $service->authenticate('*****@*****.**', 'password'); $session->setCustomerDataAsLoggedIn($customer); }
protected function setUp() { parent::setUp(); $this->_objectManager->get('Magento\\Backend\\Model\\UrlInterface')->turnOffSecretKey(); $this->_auth = $this->_objectManager->get('Magento\\Backend\\Model\\Auth'); $this->_session = $this->_auth->getAuthStorage(); $credentials = $this->_getAdminCredentials(); $this->_auth->login($credentials['user'], $credentials['password']); }
protected function setUp() { parent::setUp(); $logger = $this->getMock('Psr\\Log\\LoggerInterface', [], [], '', false); $this->_customerSession = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Customer\\Model\\Session', [$logger]); /** @var \Magento\Customer\Api\AccountManagementInterface $service */ $service = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Customer\\Api\\AccountManagementInterface'); $customer = $service->authenticate('*****@*****.**', 'password'); $this->_customerSession->setCustomerDataAsLoggedIn($customer); $this->_customerViewHelper = $this->_objectManager->create('Magento\\Customer\\Helper\\View'); $this->_messages = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Framework\\Message\\ManagerInterface'); }
protected function setUp() { parent::setUp(); $order = $this->_objectManager->create('Magento\\Sales\\Model\\Order'); $order->load('100000001', 'increment_id'); $order->getPayment()->setMethod(\Magento\Paypal\Model\Config::METHOD_PAYFLOWADVANCED); $quote = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Quote\\Model\\Quote')->setStoreId($order->getStoreId())->save(); $order->setQuoteId($quote->getId()); $order->save(); $session = $this->_objectManager->create('Magento\\Checkout\\Model\\Session'); $session->setLastRealOrderId($order->getRealOrderId())->setLastQuoteId($order->getQuoteId()); }
protected function setUp() { parent::setUp(); }
public function setUp() { parent::setUp(); $this->_objectManager->configure(['preferences' => ['Magento\\Framework\\App\\Response\\Http' => 'Magento\\Framework\\App\\Response\\Http\\Interceptor']]); $this->interceptedResponse = $this->_objectManager->create('\\Magento\\Framework\\App\\Response\\Http'); }
protected function setUp() { parent::setUp(); $this->_order = $this->_objectManager->create('Magento\\Sales\\Model\\Order'); $this->_session = $this->_objectManager->get('Magento\\Checkout\\Model\\Session'); }