protected function tearDown() { if ($this->_httpXRequestedWith !== null) { $_SERVER['HTTP_X_REQUESTED_WITH'] = $this->_httpXRequestedWith; } parent::tearDown(); }
protected function setUp() { parent::setUp(); $post = ['code' => 'test data', 'subject' => 'test data2', 'sender_email' => '*****@*****.**', 'sender_name' => 'Test Sender Name', 'text' => 'Template Content']; $this->getRequest()->setPostValue($post); $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Newsletter\\Model\\Template'); }
protected function setUp() { parent::setUp(); /** @var $integration \Magento\Integration\Model\Integration */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $integration = $objectManager->create('Magento\\Integration\\Model\\Integration'); $this->_integration = $integration->load('Fixture Integration', 'name'); }
protected function setUp() { parent::setUp(); $this->_baseControllerUrl = 'http://localhost/index.php/backend/customer/index/'; $this->customerRepository = Bootstrap::getObjectManager()->get('Magento\\Customer\\Api\\CustomerRepositoryInterface'); $this->addressRepository = Bootstrap::getObjectManager()->get('Magento\\Customer\\Api\\AddressRepositoryInterface'); $this->accountManagement = Bootstrap::getObjectManager()->get('Magento\\Customer\\Api\\AccountManagementInterface'); }
/** * @magentoDataFixture Magento/Customer/_files/customer.php * @magentoDataFixture Magento/Paypal/_files/billing_agreement.php */ public function testAclHasAccess() { /** @var $session \Magento\Backend\Model\Session */ Bootstrap::getObjectManager()->create('Magento\\Backend\\Model\\Session'); parent::testAclHasAccess(); $response = $this->getResponse(); $this->assertSelectCount('button[type="button"][title="Reset Filter"]', 1, $response->getBody(), "Response for billing agreement grid doesn't contain 'Reset Filter' button"); $this->assertSelectCount('[id="billing_agreements"]', 1, $response->getBody(), "Response for billing agreement grid doesn't contain grid"); }
protected function tearDown() { $this->_block = null; $this->_user = null; /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->get('Magento\\Framework\\Registry')->unregister('permissions_user'); parent::tearDown(); }
protected function tearDown() { /** @var $cacheState \Magento\Framework\App\Cache\StateInterface */ $cacheState = Bootstrap::getObjectManager()->get('Magento\\Framework\\App\\Cache\\StateInterface'); foreach (self::$typesConfig as $type => $value) { $cacheState->setEnabled($type, $value); } $cacheState->persist(); parent::tearDown(); }
/** * @magentoDataFixture Magento/Customer/_files/customer.php * @magentoDataFixture Magento/Paypal/_files/billing_agreement.php */ public function testAclHasAccess() { /** @var \Magento\Paypal\Model\ResourceModel\Billing\Agreement\Collection $billingAgreementCollection */ $billingAgreementCollection = Bootstrap::getObjectManager()->create('Magento\\Paypal\\Model\\ResourceModel\\Billing\\Agreement\\Collection'); $agreementId = $billingAgreementCollection->getFirstItem()->getId(); $this->uri = $this->uri . '/agreement/' . $agreementId; parent::testAclHasAccess(); $this->assertSelectCount('a[name="billing_agreement_info"]', 1, $this->getResponse()->getBody(), "Response for billing agreement info doesn't contain billing agreement info tab"); $this->assertSelectRegExp('a', '/customer\\@example.com/', 1, $this->getResponse()->getBody(), "Response for billing agreement info doesn't contain Customer info"); }
protected function setUp() { parent::setUp(); $theme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Framework\\View\\DesignInterface')->setDefaultDesignTheme()->getDesignTheme(); $type = 'Magento\\Cms\\Block\\Widget\\Page\\Link'; /** @var $model \Magento\Widget\Model\Widget\Instance */ $model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Widget\\Model\\Widget\\Instance'); $code = $model->setType($type)->getWidgetReference('type', $type, 'code'); $this->getRequest()->setParam('code', $code); $this->getRequest()->setParam('theme_id', $theme->getId()); }
protected function setUp() { parent::setUp(); $this->_baseControllerUrl = 'http://localhost/index.php/backend/customer/index/'; $this->customerRepository = Bootstrap::getObjectManager()->get('Magento\\Customer\\Api\\CustomerRepositoryInterface'); $this->addressRepository = Bootstrap::getObjectManager()->get('Magento\\Customer\\Api\\AddressRepositoryInterface'); $this->accountManagement = Bootstrap::getObjectManager()->get('Magento\\Customer\\Api\\AccountManagementInterface'); $this->formKey = Bootstrap::getObjectManager()->get('Magento\\Framework\\Data\\Form\\FormKey'); $this->objectManager = Bootstrap::getObjectManager(); $this->customerViewHelper = $this->objectManager->get('Magento\\Customer\\Helper\\View'); }
public function testAclHasAccess() { // setup /** @var \Magento\Framework\Filesystem $filesystem */ $filesystem = Bootstrap::getObjectManager()->get('Magento\\Framework\\Filesystem'); $dirStatic = $filesystem->getDirectoryWrite(DirectoryList::STATIC_VIEW); $subStaticDir = 'subdir'; $dirStatic->create($subStaticDir); $this->assertTrue($dirStatic->isExist($subStaticDir)); $dirVar = $filesystem->getDirectoryWrite(DirectoryList::VAR_DIR); $subVarDir = DirectoryList::TMP_MATERIALIZATION_DIR . '/subdir'; $dirVar->create($subVarDir); $this->assertTrue($dirVar->isExist($subVarDir)); // test parent::testAclHasAccess(); $this->assertSessionMessages($this->contains("The static files cache has been cleaned."), \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS, 'Magento\\Framework\\Message\\ManagerInterface'); $this->assertFalse($dirStatic->isExist($subStaticDir)); $this->assertTrue($dirVar->isExist(DirectoryList::TMP_MATERIALIZATION_DIR)); $this->assertFalse($dirVar->isExist($subVarDir)); }
/** * Set up */ protected function setUp() { $this->uri = 'backend/security/session/check'; parent::setUp(); }
public function setUp() { $this->resource = 'Mirasvit_Search::search_synonym'; $this->uri = 'backend/search/synonym/new'; parent::setUp(); }
/** * Tear down */ protected function tearDown() { $this->_model = null; parent::tearDown(); }
protected function setUp() { $this->_block = Bootstrap::getObjectManager()->create('Magento\\Paypal\\Block\\Billing\\Agreement\\View'); parent::setUp(); }
public function setUp() { $this->resource = 'Mirasvit_Search::search_index'; $this->uri = 'backend/search/index/edit'; parent::setUp(); }
public function tearDown() { parent::tearDown(); //$this->session->unsCustomerGroupData(); }
public function setUp() { $this->resource = 'Magento_Sales::cancel'; $this->uri = 'backend/sales/order/cancel'; parent::setUp(); }
public function setUp() { $this->resource = 'Magento_Paypal::paypal_settlement_reports_view'; $this->uri = 'backend/paypal/paypal_reports/index'; parent::setUp(); }
public function setUp() { $this->resource = 'Magento_Sales::review_payment'; $this->uri = 'backend/sales/order/reviewpayment'; parent::setUp(); }
public function setUp() { $this->resource = 'Magento_Paypal::actions_manage'; $this->uri = 'backend/paypal/billing_agreement/cancel'; parent::setUp(); }
public function setUp() { $this->resource = 'Magento_Sales::transactions_fetch'; $this->uri = 'backend/sales/transactions/fetch'; parent::setUp(); }
public function setUp() { parent::setUp(); $this->quoteItemCollectionFactory = $this->_objectManager->get('Magento\\Quote\\Model\\ResourceModel\\Quote\\Item\\CollectionFactory'); }
public function setUp() { $this->resource = 'Magento_Sales::actions_edit'; $this->uri = 'backend/sales/order/addresssave'; parent::setUp(); }
public function setUp() { $this->resource = 'Magento_AdminNotification::mark_as_read'; $this->uri = 'backend/admin/notification/massmarkasread'; parent::setUp(); }
public function setUp() { $this->resource = 'Mirasvit_Search::search_stopword'; $this->uri = 'backend/search/stopword/save'; parent::setUp(); }
public function setUp() { $this->resource = 'Magento_AdminNotification::adminnotification_remove'; $this->uri = 'backend/admin/notification/massremove'; parent::setUp(); }
protected function setUp() { parent::setUp(); $this->customerRepository = Bootstrap::getObjectManager()->get('Magento\\Customer\\Api\\CustomerRepositoryInterface'); }
/** * Set up */ protected function setUp() { $this->uri = 'backend/security/session/logoutAll'; parent::setUp(); }
public function setUp() { $this->resource = 'Magento_Paypal::billing_agreement_actions_view'; $this->uri = 'backend/paypal/billing_agreement/index'; parent::setUp(); }