Skip to content

Commit 1cf1389

Browse files
author
rani-webkul
committed
fixed disabled guest checkout issue in case of downloadable product #23971
1 parent 548ea7b commit 1cf1389

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,15 @@ public function testIsAllowedGuestCheckoutConfigSetToTrue($productType, $isAllow
144144
$this->storeMock
145145
)
146146
->willReturn(true);
147+
148+
$this->scopeConfig->expects($this->once())
149+
->method('isSetFlag')
150+
->with(
151+
IsAllowedGuestCheckoutObserver::XML_PATH_DOWNLOADABLE_SHAREABLE,
152+
ScopeInterface::SCOPE_STORE,
153+
$this->storeMock
154+
)
155+
->willReturn(false);
147156

148157
$this->observerMock->expects($this->exactly(3))
149158
->method('getEvent')
@@ -185,6 +194,15 @@ public function testIsAllowedGuestCheckoutConfigSetToFalse()
185194
)
186195
->willReturn(false);
187196

197+
$this->scopeConfig->expects($this->once())
198+
->method('isSetFlag')
199+
->with(
200+
IsAllowedGuestCheckoutObserver::XML_PATH_DOWNLOADABLE_SHAREABLE,
201+
ScopeInterface::SCOPE_STORE,
202+
$this->storeMock
203+
)
204+
->willReturn(true);
205+
188206
$this->observerMock->expects($this->exactly(2))
189207
->method('getEvent')
190208
->will($this->returnValue($this->eventMock));

0 commit comments

Comments
 (0)