Skip to content

Commit b7030c9

Browse files
author
Oleksandr Karpenko
committed
MAGETWO-54121: Can't create checkout after confirm customer account from email #4475
1 parent 46fdc3f commit b7030c9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

app/code/Magento/Customer/Test/Unit/Controller/Account/ConfirmTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,19 @@ public function testSuccessRedirect(
439439
)
440440
->willReturn($isSetFlag);
441441

442+
$cookieMetadataManager = $this->getMockBuilder(\Magento\Framework\Stdlib\Cookie\PhpCookieManager::class)
443+
->disableOriginalConstructor()
444+
->getMock();
445+
$cookieMetadataManager->expects($this->once())
446+
->method('getCookie')
447+
->with('mage-cache-sessid')
448+
->willReturn(false);
449+
450+
$refClass = new \ReflectionClass(Confirm::class);
451+
$refProperty = $refClass->getProperty('cookieMetadataManager');
452+
$refProperty->setAccessible(true);
453+
$refProperty->setValue($this->model, $cookieMetadataManager);
454+
442455
$this->model->execute();
443456
}
444457

0 commit comments

Comments
 (0)