Skip to content

Commit 1c0e85f

Browse files
author
Oleksii Korshenko
authored
MAGETWO-66424: Is Allowed Guest Checkout #7464
2 parents af34bd8 + 951605d commit 1c0e85f

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

app/code/Magento/Downloadable/Observer/IsAllowedGuestCheckoutObserver.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ public function execute(\Magento\Framework\Event\Observer $observer)
4242
$store = $observer->getEvent()->getStore();
4343
$result = $observer->getEvent()->getResult();
4444

45-
$result->setIsAllowed(true);
46-
4745
if (!$this->_scopeConfig->isSetFlag(
4846
self::XML_PATH_DISABLE_GUEST_CHECKOUT,
4947
ScopeInterface::SCOPE_STORE,

app/code/Magento/Downloadable/Test/Unit/Observer/IsAllowedGuestCheckoutObserverTest.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,8 @@ protected function setUp()
9191
*/
9292
public function testIsAllowedGuestCheckoutConfigSetToTrue($productType, $isAllowed)
9393
{
94-
$this->resultMock->expects($this->at(0))
95-
->method('setIsAllowed')
96-
->with(true);
97-
9894
if ($isAllowed) {
99-
$this->resultMock->expects($this->at(1))
95+
$this->resultMock->expects($this->at(0))
10096
->method('setIsAllowed')
10197
->with(false);
10298
}
@@ -172,10 +168,6 @@ public function dataProviderForTestisAllowedGuestCheckoutConfigSetToTrue()
172168

173169
public function testIsAllowedGuestCheckoutConfigSetToFalse()
174170
{
175-
$this->resultMock->expects($this->once())
176-
->method('setIsAllowed')
177-
->with(true);
178-
179171
$this->eventMock->expects($this->once())
180172
->method('getStore')
181173
->will($this->returnValue($this->storeMock));

0 commit comments

Comments
 (0)