本文整理匯總了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');
}
示例2: setUp
protected function setUp()
{
parent::setUp();
if (isset($_SERVER['HTTP_X_REQUESTED_WITH'])) {
$this->_httpXRequestedWith = $_SERVER['HTTP_X_REQUESTED_WITH'];
}
}
示例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');
}
示例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');
}
示例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');
}
示例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);
}
示例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());
}
示例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');
}
示例9: setUp
protected function setUp()
{
parent::setUp();
$this->customerRepository = Bootstrap::getObjectManager()->get('Magento\\Customer\\Api\\CustomerRepositoryInterface');
}
示例10: setUp
public function setUp()
{
$this->resource = 'Mirasvit_Search::search_stopword';
$this->uri = 'backend/search/stopword/save';
parent::setUp();
}
示例11: setUp
protected function setUp()
{
parent::setUp();
$this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Newsletter\\Model\\Template');
}
示例12: setUp
protected function setUp()
{
parent::setUp();
$this->productRepository = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Catalog\\Api\\ProductRepositoryInterface');
}
示例13: setUp
public function setUp()
{
parent::setUp();
$this->quoteItemCollectionFactory = $this->_objectManager->get('Magento\\Quote\\Model\\ResourceModel\\Quote\\Item\\CollectionFactory');
}
示例14: setUp
/**
* Set up
*/
protected function setUp()
{
$this->uri = 'backend/security/session/check';
parent::setUp();
}
示例15: setUp
/**
* Initial setup
*/
protected function setUp()
{
$this->currencyRate = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Directory\\Model\\Currency');
parent::setUp();
}