Skip to content

Commit

Permalink
handle calling getUser in test (#22833)
Browse files Browse the repository at this point in the history
  • Loading branch information
lfolco committed May 19, 2019
1 parent 976076f commit db95a0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/code/Magento/Security/Model/AdminSessionsManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ public function processProlong()
$this->getCurrentSession()->save();
}

// todo: don't necessarily have a user here
if ($this->authSession->getUser()->getExpiresAt())
{
$this->revokeExpiredAdminUser();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@ public function testProcessProlong()
->method('save')
->willReturnSelf();

$this->authSessionMock->expects($this->once())
->method('getUser')
->willReturn($this->userMock);

$this->model->processProlong();
}

Expand Down

0 comments on commit db95a0d

Please sign in to comment.