Skip to content

Commit 55047c7

Browse files
committed
Add unit test coverage for this changes.
1 parent 9a4f260 commit 55047c7

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

app/code/Magento/Integration/Model/CustomerTokenService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ class CustomerTokenService implements \Magento\Integration\Api\CustomerTokenServ
6666
public function __construct(
6767
TokenModelFactory $tokenModelFactory,
6868
AccountManagementInterface $accountManagement,
69-
TokenCollectionFactory $tokenModelCollectionFactory,
69+
TokenCollectionFactory $tokenModelCollectionFactory,
7070
CredentialsValidator $validatorHelper,
7171
ManagerInterface $eventManager
7272
) {
7373
$this->tokenModelFactory = $tokenModelFactory;
7474
$this->accountManagement = $accountManagement;
7575
$this->tokenModelCollectionFactory = $tokenModelCollectionFactory;
76-
$this->eventManager = $eventManager;
7776
$this->validatorHelper = $validatorHelper;
77+
$this->eventManager = $eventManager;
7878
}
7979

8080
/**

app/code/Magento/Integration/Test/Unit/Model/CustomerTokenServiceTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ class CustomerTokenServiceTest extends \PHPUnit\Framework\TestCase
3232
/** @var \Magento\Integration\Model\Oauth\Token|\PHPUnit_Framework_MockObject_MockObject */
3333
private $_tokenMock;
3434

35+
/** @var \Magento\Framework\Event\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject */
36+
protected $manager;
37+
3538
protected function setUp()
3639
{
3740
$this->_tokenFactoryMock = $this->getMockBuilder(\Magento\Integration\Model\Oauth\TokenFactory::class)
@@ -67,11 +70,14 @@ protected function setUp()
6770
\Magento\Integration\Model\CredentialsValidator::class
6871
)->disableOriginalConstructor()->getMock();
6972

73+
$this->manager = $this->createMock(\Magento\Framework\Event\ManagerInterface::class);
74+
7075
$this->_tokenService = new \Magento\Integration\Model\CustomerTokenService(
7176
$this->_tokenFactoryMock,
7277
$this->_accountManagementMock,
7378
$this->_tokenModelCollectionFactoryMock,
74-
$this->validatorHelperMock
79+
$this->validatorHelperMock,
80+
$this->manager
7581
);
7682
}
7783

0 commit comments

Comments
 (0)