Skip to content

Commit 1c4e5e8

Browse files
author
Mike Weis
committed
MAGETWO-57065: [Github] admin stuck on " It's time to change your password." #4331- fix for 2.0
- fixed build breaks
1 parent ddf9598 commit 1c4e5e8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

app/code/Magento/Backend/Test/Unit/Controller/Adminhtml/System/Account/SaveTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ protected function setUp()
7676
$this->_userMock = $this->getMockBuilder('Magento\User\Model\User')
7777
->disableOriginalConstructor()
7878
->setMethods(
79-
['load', 'save', 'sendPasswordResetNotificationEmail', 'verifyIdentity', '__sleep', '__wakeup']
79+
[
80+
'load', 'save', 'sendPasswordResetNotificationEmail',
81+
'verifyIdentity', 'validate', '__sleep', '__wakeup'
82+
]
8083
)
8184
->getMock();
8285

@@ -193,6 +196,7 @@ public function testSaveAction()
193196

194197
$this->_userMock->expects($this->once())->method('save');
195198
$this->_userMock->expects($this->once())->method('verifyIdentity')->will($this->returnValue(true));
199+
$this->_userMock->expects($this->once())->method('validate')->willReturn(true);
196200
$this->_userMock->expects($this->once())->method('sendPasswordResetNotificationEmail');
197201

198202
$this->_requestMock->setParams($requestParams);

app/code/Magento/User/Test/Unit/Observer/Backend/TrackAdminNewPasswordObserverTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ public function setUp()
8282
public function testTrackAdminPassword()
8383
{
8484
$newPW = "mYn3wpassw0rd";
85-
$oldPW = "notsecure";
8685
$uid = 123;
8786
/** @var \Magento\Framework\Event\Observer|\PHPUnit_Framework_MockObject_MockObject $eventObserverMock */
8887
$eventObserverMock = $this->getMockBuilder('Magento\Framework\Event\Observer')

0 commit comments

Comments
 (0)