Skip to content

Commit 1d6bca8

Browse files
authored
ENGCOM-5971: #23295: Reset Password Confirmation Link Email Not St… #24783
2 parents 6f1a6f7 + cf4910a commit 1d6bca8

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

app/code/Magento/Customer/Model/EmailNotification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ public function passwordReminder(CustomerInterface $customer)
340340
*/
341341
public function passwordResetConfirmation(CustomerInterface $customer)
342342
{
343-
$storeId = $this->storeManager->getStore()->getId();
343+
$storeId = $customer->getStoreId();
344344
if (!$storeId) {
345345
$storeId = $this->getWebsiteStoreId($customer);
346346
}

app/code/Magento/Customer/Test/Unit/Model/EmailNotificationTest.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ public function testPasswordResetConfirmation()
521521

522522
/** @var CustomerInterface|\PHPUnit_Framework_MockObject_MockObject $customer */
523523
$customer = $this->createMock(CustomerInterface::class);
524-
$customer->expects($this->any())
524+
$customer->expects($this->once())
525525
->method('getStoreId')
526526
->willReturn($customerStoreId);
527527
$customer->expects($this->any())
@@ -539,11 +539,6 @@ public function testPasswordResetConfirmation()
539539
->method('getStore')
540540
->willReturn($this->storeMock);
541541

542-
$this->storeManagerMock->expects($this->at(1))
543-
->method('getStore')
544-
->with($customerStoreId)
545-
->willReturn($this->storeMock);
546-
547542
$this->customerRegistryMock->expects($this->once())
548543
->method('retrieveSecureData')
549544
->with($customerId)

0 commit comments

Comments
 (0)