當前位置: 首頁>>代碼示例>>PHP>>正文


PHP AbstractBackendController::setUp方法代碼示例

本文整理匯總了PHP中Magento\TestFramework\TestCase\AbstractBackendController::setUp方法的典型用法代碼示例。如果您正苦於以下問題:PHP AbstractBackendController::setUp方法的具體用法?PHP AbstractBackendController::setUp怎麽用?PHP AbstractBackendController::setUp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Magento\TestFramework\TestCase\AbstractBackendController的用法示例。


在下文中一共展示了AbstractBackendController::setUp方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 protected function setUp()
 {
     parent::setUp();
     $post = ['code' => 'test data', 'subject' => 'test data2', 'sender_email' => 'sender@email.com', 'sender_name' => 'Test Sender Name', 'text' => 'Template Content'];
     $this->getRequest()->setPostValue($post);
     $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Newsletter\\Model\\Template');
 }
開發者ID:andrewhowdencom,項目名稱:m2onk8s,代碼行數:7,代碼來源:NewsletterTemplateTest.php

示例2: setUp

 protected function setUp()
 {
     parent::setUp();
     if (isset($_SERVER['HTTP_X_REQUESTED_WITH'])) {
         $this->_httpXRequestedWith = $_SERVER['HTTP_X_REQUESTED_WITH'];
     }
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:7,代碼來源:ExportTest.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $objectManager = Bootstrap::getObjectManager();
     $this->session = $objectManager->get('Magento\\Framework\\Session\\SessionManagerInterface');
     $this->groupRepository = $objectManager->get('Magento\\Customer\\Api\\GroupRepositoryInterface');
 }
開發者ID:andrewhowdencom,項目名稱:m2onk8s,代碼行數:7,代碼來源:GroupTest.php

示例4: setUp

 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');
 }
開發者ID:BlackIkeEagle,項目名稱:magento2-continuousphp,代碼行數:8,代碼來源:IntegrationTest.php

示例5: setUp

 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');
 }
開發者ID:niranjanssiet,項目名稱:magento2,代碼行數:8,代碼來源:IndexTest.php

示例6: setUp

 protected function setUp()
 {
     parent::setUp();
     /** @var $objectManager \Magento\TestFramework\ObjectManager */
     $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
     $this->_block = $objectManager->create('Magento\\User\\Block\\User\\Edit\\Tab\\Main');
     $this->_block->setArea('adminhtml');
     $this->_user = $objectManager->create('Magento\\User\\Model\\User');
     $objectManager->get('Magento\\Framework\\Registry')->register('permissions_user', $this->_user);
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:10,代碼來源:MainTest.php

示例7: setUp

 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());
 }
開發者ID:nja78,項目名稱:magento2,代碼行數:11,代碼來源:InstanceTest.php

示例8: setUp

 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');
 }
開發者ID:rafaelstz,項目名稱:magento2,代碼行數:11,代碼來源:IndexTest.php

示例9: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->customerRepository = Bootstrap::getObjectManager()->get('Magento\\Customer\\Api\\CustomerRepositoryInterface');
 }
開發者ID:andrewhowdencom,項目名稱:m2onk8s,代碼行數:5,代碼來源:MassAssignGroupTest.php

示例10: setUp

 public function setUp()
 {
     $this->resource = 'Mirasvit_Search::search_stopword';
     $this->uri = 'backend/search/stopword/save';
     parent::setUp();
 }
開發者ID:Doability,項目名稱:magento2dev,代碼行數:6,代碼來源:SaveTest.php

示例11: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Newsletter\\Model\\Template');
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:5,代碼來源:NewsletterQueueTest.php

示例12: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->productRepository = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Catalog\\Api\\ProductRepositoryInterface');
 }
開發者ID:Doability,項目名稱:magento2dev,代碼行數:5,代碼來源:CreateTest.php

示例13: setUp

 public function setUp()
 {
     parent::setUp();
     $this->quoteItemCollectionFactory = $this->_objectManager->get('Magento\\Quote\\Model\\ResourceModel\\Quote\\Item\\CollectionFactory');
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:5,代碼來源:CartTest.php

示例14: setUp

 /**
  * Set up
  */
 protected function setUp()
 {
     $this->uri = 'backend/security/session/check';
     parent::setUp();
 }
開發者ID:BlackIkeEagle,項目名稱:magento2-continuousphp,代碼行數:8,代碼來源:CheckTest.php

示例15: setUp

 /**
  * Initial setup
  */
 protected function setUp()
 {
     $this->currencyRate = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Directory\\Model\\Currency');
     parent::setUp();
 }
開發者ID:VoblaSmile,項目名稱:php56-magento2-data,代碼行數:8,代碼來源:SaveRatesTest.php


注:本文中的Magento\TestFramework\TestCase\AbstractBackendController::setUp方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。