Skip to content

Commit 9736527

Browse files
committed
ACP2E-3657: Weak Password Management
1 parent b135be0 commit 9736527

File tree

2 files changed

+5
-8
lines changed
  • app/code/Magento/User

2 files changed

+5
-8
lines changed

app/code/Magento/User/Controller/Adminhtml/User/Save.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ public function execute()
140140
}
141141
$this->redirectToEdit($model, $data);
142142
}
143+
144+
return $this->getResponse();
143145
}
144146

145147
/**

app/code/Magento/User/Test/Unit/Controller/Adminhtml/User/SaveTest.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Magento\Framework\App\ResponseInterface;
1515
use Magento\Framework\Message\ManagerInterface;
1616
use Magento\Framework\ObjectManagerInterface;
17-
use Magento\Framework\Registry;
1817
use Magento\User\Controller\Adminhtml\User\Save;
1918
use Magento\User\Model\User;
2019
use Magento\User\Model\UserFactory;
@@ -63,11 +62,6 @@ class SaveTest extends TestCase
6362
*/
6463
private $contextMock;
6564

66-
/**
67-
* @var Registry|MockObject
68-
*/
69-
private $registryMock;
70-
7165
protected function setUp(): void
7266
{
7367
$this->requestMock = $this->createMock(Http::class);
@@ -83,8 +77,9 @@ protected function setUp(): void
8377
->disableOriginalConstructor()
8478
->addMethods(['setUserData'])
8579
->getMock();
80+
// phpcs:ignore Magento2.Deprecation.Registry -- Required for testing core dependency
81+
$registryMock = $this->createMock(\Magento\Framework\Registry::class);
8682
$this->contextMock = $this->createMock(Context::class);
87-
$this->registryMock = $this->createMock(Registry::class);
8883
$this->userFactoryMock->expects($this->once())
8984
->method('create')
9085
->willReturn($this->userModelMock);
@@ -112,7 +107,7 @@ protected function setUp(): void
112107
->setConstructorArgs([
113108
'context' => $this->contextMock,
114109
'userFactory' => $this->userFactoryMock,
115-
'coreRegistry' => $this->registryMock
110+
'coreRegistry' => $registryMock
116111
])
117112
->onlyMethods(['redirectToEdit'])
118113
->getMock();

0 commit comments

Comments
 (0)