Skip to content

Commit 665ff19

Browse files
committed
MAGETWO-36378: Magento\Quote\Api\GuestCartManagement
- Remove \Magento\Quote\Model\GuestCart\GuestCartManagement::getCartForCustomer - Remove associated unit test case
1 parent 300d8db commit 665ff19

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

app/code/Magento/Quote/Model/GuestCart/GuestCartManagement.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,4 @@ public function placeOrder($cartId)
8484
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
8585
return $this->quoteManagement->placeOrder($quoteIdMask->getId());
8686
}
87-
88-
/**
89-
* {@inheritdoc}
90-
*/
91-
public function getCartForCustomer($customerId)
92-
{
93-
$cart = $this->quoteRepository->getActiveForCustomer($customerId);
94-
/** @var $quoteIdMask QuoteIdMask */
95-
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cart->getId(), 'masked_id');
96-
$cart->setId($quoteIdMask->getId());
97-
return $cart;
98-
}
9987
}

app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartManagementTest.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,4 @@ public function testPlaceOrder()
115115

116116
$this->assertEquals($orderId, $this->guestCartManagement->placeOrder($cartId));
117117
}
118-
119-
public function testGetCartForCustomer()
120-
{
121-
$maskedCartId = 'masked1cart2id3';
122-
$cartId = 1;
123-
$orderId = 1;
124-
125-
$this->quoteIdMaskMock->expects($this->once())->method('load')->with($cartId, 'masked_id')->willReturnSelf();
126-
$this->quoteIdMaskMock->expects($this->once())->method('getId')->willReturn($maskedCartId);
127-
$this->quoteIdMaskFactoryMock->expects($this->once())->method('create')->willReturn($this->quoteIdMaskMock);
128-
$this->quoteManagementMock->expects($this->once())->method('placeOrder')->willReturn($orderId);
129-
130-
$this->assertEquals($orderId, $this->guestCartManagement->placeOrder($cartId));
131-
}
132118
}

0 commit comments

Comments
 (0)