diff --git a/app/code/Magento/Quote/Model/GuestCart/GuestCartManagement.php b/app/code/Magento/Quote/Model/GuestCart/GuestCartManagement.php index 62966b0c86f882c64207becec6f73fd395d52ab2..a1fc33a72c4d37d62f55c4bd6bbd4ac73d372331 100644 --- a/app/code/Magento/Quote/Model/GuestCart/GuestCartManagement.php +++ b/app/code/Magento/Quote/Model/GuestCart/GuestCartManagement.php @@ -84,16 +84,4 @@ class GuestCartManagement implements GuestCartManagementInterface $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); return $this->quoteManagement->placeOrder($quoteIdMask->getId()); } - - /** - * {@inheritdoc} - */ - public function getCartForCustomer($customerId) - { - $cart = $this->quoteRepository->getActiveForCustomer($customerId); - /** @var $quoteIdMask QuoteIdMask */ - $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cart->getId(), 'masked_id'); - $cart->setId($quoteIdMask->getId()); - return $cart; - } } diff --git a/app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartManagementTest.php b/app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartManagementTest.php index cc567b0262f780f4a0b54c8a1bb62976753d9fc7..b1f04f3a0c3940fa8d75ff289789fae2dee08bf3 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartManagementTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartManagementTest.php @@ -115,18 +115,4 @@ class GuestCartManagementTest extends \PHPUnit_Framework_TestCase $this->assertEquals($orderId, $this->guestCartManagement->placeOrder($cartId)); } - - public function testGetCartForCustomer() - { - $maskedCartId = 'masked1cart2id3'; - $cartId = 1; - $orderId = 1; - - $this->quoteIdMaskMock->expects($this->once())->method('load')->with($cartId, 'masked_id')->willReturnSelf(); - $this->quoteIdMaskMock->expects($this->once())->method('getId')->willReturn($maskedCartId); - $this->quoteIdMaskFactoryMock->expects($this->once())->method('create')->willReturn($this->quoteIdMaskMock); - $this->quoteManagementMock->expects($this->once())->method('placeOrder')->willReturn($orderId); - - $this->assertEquals($orderId, $this->guestCartManagement->placeOrder($cartId)); - } }