Skip to content

Commit

Permalink
replaced deprecated addWarning method with addWarningMessage method i…
Browse files Browse the repository at this point in the history
…n Security module
  • Loading branch information
kishorekumarkesavan committed May 18, 2020
1 parent 62ffa42 commit 6a69a8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/Security/Model/Plugin/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function afterLogin(\Magento\Backend\Model\Auth $authModel)
{
$this->sessionsManager->processLogin();
if ($this->sessionsManager->getCurrentSession()->isOtherSessionsTerminated()) {
$this->messageManager->addWarning(__('All other open sessions for this account were terminated.'));
$this->messageManager->addWarningMessage(__('All other open sessions for this account were terminated.'));
}
}

Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Security/Test/Unit/Model/Plugin/AuthTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected function setUp(): void

$this->messageManager = $this->getMockForAbstractClass(
ManagerInterface::class,
['addWarning'],
['addWarningMessage'],
'',
false
);
Expand Down Expand Up @@ -100,7 +100,7 @@ public function testAfterLogin()
->method('isOtherSessionsTerminated')
->willReturn(true);
$this->messageManager->expects($this->once())
->method('addWarning')
->method('addWarningMessage')
->with($warningMessage);

$this->model->afterLogin($this->authMock);
Expand Down

0 comments on commit 6a69a8f

Please sign in to comment.