Skip to content

Commit 07a31bc

Browse files
committed
MAGETWO-61066: [Backport] - Shopping Cart not being cleared when changing between different websites on the same domain. - for 2.0
1 parent 0a562bd commit 07a31bc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function testGetTotalsHtml()
124124
public function testGetConfig()
125125
{
126126
$websiteId = 100;
127-
$storeMock = $this->getMock('\Magento\Store\Model\Store', [], [], '', false);
127+
$storeMock = $this->getMock(\Magento\Store\Model\Store::class, [], [], '', false);
128128

129129
$shoppingCartUrl = 'http://url.com/cart';
130130
$checkoutUrl = 'http://url.com/checkout';

app/code/Magento/Checkout/Test/Unit/CustomerData/CartTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ public function testGetSectionData()
9595
$shortcutButtonsHtml = '<span>Buttons</span>';
9696
$websiteId = 100;
9797

98-
$subtotalMock = $this->getMock('\Magento\Framework\DataObject', ['getValue'], [], '', false);
98+
$subtotalMock = $this->getMock(\Magento\Framework\DataObject::class, ['getValue'], [], '', false);
9999
$subtotalMock->expects($this->once())->method('getValue')->willReturn($subtotalValue);
100100
$totals = ['subtotal' => $subtotalMock];
101101

102102
$quoteMock = $this->getMock(
103-
'\Magento\Quote\Model\Quote',
103+
\Magento\Quote\Model\Quote::class,
104104
['getTotals', 'getHasError', 'getAllVisibleItems', 'getStore'],
105105
[],
106106
'',
@@ -117,15 +117,15 @@ public function testGetSectionData()
117117
->willReturn($subtotalValue);
118118
$this->checkoutHelperMock->expects($this->once())->method('canOnepageCheckout')->willReturn(true);
119119

120-
$quoteItemMock = $this->getMock('\Magento\Quote\Model\Quote\Item', ['getProduct', 'getStoreId'], [], '', false);
120+
$quoteItemMock = $this->getMock(\Magento\Quote\Model\Quote\Item::class, ['getProduct', 'getStoreId'], [], '', false);
121121
$quoteMock->expects($this->once())->method('getAllVisibleItems')->willReturn([$quoteItemMock]);
122122

123123
$storeMock = $this->getMock(\Magento\Store\Model\System\Store::class, ['getWebsiteId'], [], '', false);
124124
$storeMock->expects($this->once())->method('getWebsiteId')->willReturn($websiteId);
125125
$quoteMock->expects($this->once())->method('getStore')->willReturn($storeMock);
126126

127127
$productMock = $this->getMock(
128-
'\Magento\Catalog\Model\Product',
128+
\Magento\Catalog\Model\Product::class,
129129
['isVisibleInSiteVisibility', 'getId', 'setUrlDataObject'],
130130
[],
131131
'',

0 commit comments

Comments
 (0)