Skip to content

Commit e60ecdf

Browse files
[2.3-develop] Forwardport of #11458
1 parent 72c4965 commit e60ecdf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

app/code/Magento/Quote/Test/Unit/Model/QuoteManagementTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,15 @@ public function testCreateEmptyCartAnonymous()
246246
$quoteId = 2311;
247247

248248
$quoteMock = $this->createMock(\Magento\Quote\Model\Quote::class);
249-
250-
$quoteAddress = $this->createMock(\Magento\Quote\Model\Quote\Address::class);
249+
$quoteAddress = $this->createPartialMock(
250+
\Magento\Quote\Model\Quote\Address::class,
251+
['setCollectShippingRates']
252+
);
253+
$quoteAddress->expects($this->once())->method('setCollectShippingRates')->with(true);
251254

252255
$quoteMock->expects($this->any())->method('setBillingAddress')->with($quoteAddress)->willReturnSelf();
253256
$quoteMock->expects($this->any())->method('setShippingAddress')->with($quoteAddress)->willReturnSelf();
257+
$quoteMock->expects($this->any())->method('getShippingAddress')->willReturn($quoteAddress);
254258

255259
$this->quoteAddressFactory->expects($this->any())->method('create')->willReturn($quoteAddress);
256260

0 commit comments

Comments
 (0)