• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP TestCase\AbstractBackendController类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Magento\TestFramework\TestCase\AbstractBackendController的典型用法代码示例。如果您正苦于以下问题:PHP AbstractBackendController类的具体用法?PHP AbstractBackendController怎么用?PHP AbstractBackendController使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了AbstractBackendController类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: tearDown

 protected function tearDown()
 {
     if ($this->_httpXRequestedWith !== null) {
         $_SERVER['HTTP_X_REQUESTED_WITH'] = $this->_httpXRequestedWith;
     }
     parent::tearDown();
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:7,代码来源:ExportTest.php


示例2: setUp

 protected function setUp()
 {
     parent::setUp();
     $post = ['code' => 'test data', 'subject' => 'test data2', 'sender_email' => '[email protected]', '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


示例3: 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


示例4: 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


示例5: testAclHasAccess

 /**
  * @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");
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:13,代码来源:GridTest.php


示例6: tearDown

 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();
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:9,代码来源:MainTest.php


示例7: 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();
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:10,代码来源:MassActionTest.php


示例8: testAclHasAccess

 /**
  * @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");
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:14,代码来源:ViewTest.php


示例9: 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


示例10: 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


示例11: testAclHasAccess

 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));
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:20,代码来源:CleanStaticFilesTest.php


示例12: setUp

 /**
  * Set up
  */
 protected function setUp()
 {
     $this->uri = 'backend/security/session/check';
     parent::setUp();
 }
开发者ID:BlackIkeEagle,项目名称:magento2-continuousphp,代码行数:8,代码来源:CheckTest.php


示例13: setUp

 public function setUp()
 {
     $this->resource = 'Mirasvit_Search::search_synonym';
     $this->uri = 'backend/search/synonym/new';
     parent::setUp();
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:6,代码来源:NewActionTest.php


示例14: tearDown

 /**
  * Tear down
  */
 protected function tearDown()
 {
     $this->_model = null;
     parent::tearDown();
 }
开发者ID:VoblaSmile,项目名称:php56-magento2-data,代码行数:8,代码来源:SaveRatesTest.php


示例15: setUp

 protected function setUp()
 {
     $this->_block = Bootstrap::getObjectManager()->create('Magento\\Paypal\\Block\\Billing\\Agreement\\View');
     parent::setUp();
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:5,代码来源:ViewTest.php


示例16: tearDown

 public function tearDown()
 {
     parent::tearDown();
     //$this->session->unsCustomerGroupData();
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:5,代码来源:GroupTest.php


示例17: 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


示例18: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->customerRepository = Bootstrap::getObjectManager()->get('Magento\\Customer\\Api\\CustomerRepositoryInterface');
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:5,代码来源:MassAssignGroupTest.php



注:本文中的Magento\TestFramework\TestCase\AbstractBackendController类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Columns\Column类代码示例发布时间:2022-05-23
下一篇:
PHP Helper\ObjectManager类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap