12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <?php
- /**
- * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
- */
- namespace Temando\Shipping\Controller\Adminhtml\Dispatch;
- use Magento\Framework\Session\SessionManagerInterface;
- use Magento\TestFramework\Helper\Bootstrap;
- use Magento\TestFramework\TestCase\AbstractBackendController;
- use Temando\Shipping\Rest\AuthenticationInterface;
- /**
- * @magentoAppArea adminhtml
- */
- class IndexTest extends AbstractBackendController
- {
- /**
- * The resource used to authorize action
- *
- * @var string
- */
- protected $resource = 'Temando_Shipping::dispatches';
- /**
- * The uri at which to access the controller
- *
- * @var string
- */
- protected $uri = 'backend/temando/dispatch/index';
- protected function setUp()
- {
- parent::setUp();
- /** @var SessionManagerInterface $adminSession */
- $adminSession = Bootstrap::getObjectManager()->get(SessionManagerInterface::class);
- $adminSession->setData(AuthenticationInterface::DATA_KEY_SESSION_TOKEN_EXPIRY, '2038-01-19T03:03:33.000Z');
- }
- /**
- * @test
- * @magentoConfigFixture default/carriers/temando/account_id 23
- * @magentoConfigFixture default/carriers/temando/bearer_token 808
- */
- public function pageIsRendered()
- {
- $this->dispatch($this->uri);
- $this->assertContains('DispatchList', $this->getResponse()->getBody());
- }
- /**
- * @test
- * @magentoConfigFixture default/carriers/temando/account_id 23
- * @magentoConfigFixture default/carriers/temando/bearer_token 808
- */
- public function testAclHasAccess()
- {
- parent::testAclHasAccess();
- }
- /**
- * @test
- * @magentoConfigFixture default/carriers/temando/account_id 23
- * @magentoConfigFixture default/carriers/temando/bearer_token 808
- */
- public function testAclNoAccess()
- {
- parent::testAclNoAccess();
- }
- }
|