Skip to content

Commit e4452f6

Browse files
magento2-login-as-customer/issues/90: Integration tests fix.
1 parent 080a624 commit e4452f6

File tree

1 file changed

+11
-0
lines changed
  • dev/tests/integration/testsuite/Magento/Sales/Model/AdminOrder

1 file changed

+11
-0
lines changed

dev/tests/integration/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace Magento\Sales\Model\AdminOrder;
77

8+
use Magento\Backend\Model\Auth;
89
use Magento\Backend\Model\Session\Quote as SessionQuote;
910
use Magento\Customer\Api\AddressRepositoryInterface;
1011
use Magento\Customer\Api\CustomerRepositoryInterface;
@@ -42,11 +43,21 @@ class CreateTest extends \PHPUnit\Framework\TestCase
4243
*/
4344
private $objectManager;
4445

46+
/**
47+
* @var Auth
48+
*/
49+
private $auth;
50+
4551
protected function setUp()
4652
{
4753
$this->objectManager = Bootstrap::getObjectManager();
4854
$this->messageManager = $this->objectManager->get(ManagerInterface::class);
4955
$this->model =$this->objectManager->create(Create::class, ['messageManager' => $this->messageManager]);
56+
$this->auth = $this->objectManager->create(Auth::class);
57+
$this->auth->login(
58+
\Magento\TestFramework\Bootstrap::ADMIN_NAME,
59+
\Magento\TestFramework\Bootstrap::ADMIN_PASSWORD
60+
);
5061
}
5162

5263
/**

0 commit comments

Comments
 (0)