Skip to content

Commit 6a69a8f

Browse files
replaced deprecated addWarning method with addWarningMessage method in Security module
1 parent 62ffa42 commit 6a69a8f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/code/Magento/Security/Model/Plugin/Auth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function afterLogin(\Magento\Backend\Model\Auth $authModel)
4343
{
4444
$this->sessionsManager->processLogin();
4545
if ($this->sessionsManager->getCurrentSession()->isOtherSessionsTerminated()) {
46-
$this->messageManager->addWarning(__('All other open sessions for this account were terminated.'));
46+
$this->messageManager->addWarningMessage(__('All other open sessions for this account were terminated.'));
4747
}
4848
}
4949

app/code/Magento/Security/Test/Unit/Model/Plugin/AuthTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ protected function setUp(): void
6464

6565
$this->messageManager = $this->getMockForAbstractClass(
6666
ManagerInterface::class,
67-
['addWarning'],
67+
['addWarningMessage'],
6868
'',
6969
false
7070
);
@@ -100,7 +100,7 @@ public function testAfterLogin()
100100
->method('isOtherSessionsTerminated')
101101
->willReturn(true);
102102
$this->messageManager->expects($this->once())
103-
->method('addWarning')
103+
->method('addWarningMessage')
104104
->with($warningMessage);
105105

106106
$this->model->afterLogin($this->authMock);

0 commit comments

Comments
 (0)