Skip to content

Commit 2f0225c

Browse files
committed
MAGETWO-52449: Issues with minicart in multiwebsite
1 parent 2fb13d9 commit 2f0225c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

app/code/Magento/Checkout/Test/Unit/Block/Cart/SidebarTest.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public function testGetConfig()
158158
$this->urlBuilderMock->expects($this->exactly(4))
159159
->method('getUrl')
160160
->willReturnMap($valueMap);
161-
$this->storeManagerMock->expects($this->once())->method('getStore')->willReturn($storeMock);
161+
$this->storeManagerMock->expects($this->exactly(2))->method('getStore')->willReturn($storeMock);
162162
$storeMock->expects($this->once())->method('getBaseUrl')->willReturn($baseUrl);
163163
$this->imageHelper->expects($this->once())->method('getFrame')->willReturn(false);
164164

@@ -168,13 +168,8 @@ public function testGetConfig()
168168
\Magento\Checkout\Block\Cart\Sidebar::XML_PATH_CHECKOUT_SIDEBAR_COUNT,
169169
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
170170
)->willReturn(3);
171-
172-
$quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false);
173-
$this->checkoutSessionMock->expects($this->once())->method('getQuote')->willReturn($quoteMock);
174-
175-
$storeMock = $this->getMock(\Magento\Store\Model\System\Store::class, ['getWebsiteId'], [], '', false);
171+
176172
$storeMock->expects($this->once())->method('getWebsiteId')->willReturn($websiteId);
177-
$quoteMock->expects($this->once())->method('getStore')->willReturn($storeMock);
178173

179174
$this->assertEquals($expectedResult, $this->model->getConfig());
180175
}

0 commit comments

Comments
 (0)