Skip to content

Commit b52c4e6

Browse files
author
Michael Logvin
committed
MAGETWO-36934: Pull request processing MAGETWO-34646
1 parent ecda431 commit b52c4e6

18 files changed

+48
-45
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function assign($cartId, \Magento\Quote\Api\Data\AddressInterface $addres
4646
{
4747
/** @var $quoteIdMask QuoteIdMask */
4848
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
49-
return $this->billingAddressManagement->assign($quoteIdMask->getId(), $address);
49+
return $this->billingAddressManagement->assign($quoteIdMask->getQuoteId(), $address);
5050
}
5151

5252
/**
@@ -56,6 +56,6 @@ public function get($cartId)
5656
{
5757
/** @var $quoteIdMask QuoteIdMask */
5858
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
59-
return $this->billingAddressManagement->get($quoteIdMask->getId());
59+
return $this->billingAddressManagement->get($quoteIdMask->getQuoteId());
6060
}
6161
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function getList($cartId)
4747
{
4848
/** @var $quoteIdMask QuoteIdMask */
4949
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
50-
$cartItemList = $this->repository->getList($quoteIdMask->getId());
50+
$cartItemList = $this->repository->getList($quoteIdMask->getQuoteId());
5151
/** @var $item CartItemInterface */
5252
foreach ($cartItemList as $item) {
5353
$item->setQuoteId($quoteIdMask->getMaskedId());
@@ -62,7 +62,7 @@ public function save(\Magento\Quote\Api\Data\CartItemInterface $cartItem)
6262
{
6363
/** @var $quoteIdMask QuoteIdMask */
6464
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartItem->getQuoteId(), 'masked_id');
65-
$cartItem->setQuoteId($quoteIdMask->getId());
65+
$cartItem->setQuoteId($quoteIdMask->getQuoteId());
6666
return $this->repository->save($cartItem);
6767
}
6868

@@ -73,6 +73,6 @@ public function deleteById($cartId, $itemId)
7373
{
7474
/** @var $quoteIdMask QuoteIdMask */
7575
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
76-
return $this->repository->deleteById($quoteIdMask->getId(), $itemId);
76+
return $this->repository->deleteById($quoteIdMask->getQuoteId(), $itemId);
7777
}
7878
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function createEmptyCart()
5151
/** @var $quoteIdMask \Magento\Quote\Model\QuoteIdMask */
5252
$quoteIdMask = $this->quoteIdMaskFactory->create();
5353
$cartId = $this->quoteManagement->createEmptyCart();
54-
$quoteIdMask->setId($cartId)->save();
54+
$quoteIdMask->setQuoteId($cartId)->save();
5555
return $quoteIdMask->getMaskedId();
5656
}
5757

@@ -62,7 +62,7 @@ public function assignCustomer($cartId, $customerId, $storeId)
6262
{
6363
/** @var $quoteIdMask QuoteIdMask */
6464
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
65-
return $this->quoteManagement->assignCustomer($quoteIdMask->getId(), $customerId, $storeId);
65+
return $this->quoteManagement->assignCustomer($quoteIdMask->getQuoteId(), $customerId, $storeId);
6666
}
6767

6868
/**
@@ -72,6 +72,6 @@ public function placeOrder($cartId)
7272
{
7373
/** @var $quoteIdMask QuoteIdMask */
7474
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
75-
return $this->quoteManagement->placeOrder($quoteIdMask->getId());
75+
return $this->quoteManagement->placeOrder($quoteIdMask->getQuoteId());
7676
}
7777
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ public function get($cartId)
4646
{
4747
/** @var $quoteIdMask QuoteIdMask */
4848
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
49-
return $this->quoteRepository->get($quoteIdMask->getId());
49+
return $this->quoteRepository->get($quoteIdMask->getQuoteId());
5050
}
5151
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ public function get($cartId)
4747
{
4848
/** @var $quoteIdMask QuoteIdMask */
4949
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
50-
return $this->cartTotalRepository->get($quoteIdMask->getId());
50+
return $this->cartTotalRepository->get($quoteIdMask->getQuoteId());
5151
}
5252
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function get($cartId)
4747
{
4848
/** @var $quoteIdMask QuoteIdMask */
4949
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
50-
return $this->couponManagement->get($quoteIdMask->getId());
50+
return $this->couponManagement->get($quoteIdMask->getQuoteId());
5151
}
5252

5353
/**
@@ -57,7 +57,7 @@ public function set($cartId, $couponCode)
5757
{
5858
/** @var $quoteIdMask QuoteIdMask */
5959
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
60-
return $this->couponManagement->set($quoteIdMask->getId(), $couponCode);
60+
return $this->couponManagement->set($quoteIdMask->getQuoteId(), $couponCode);
6161
}
6262

6363
/**
@@ -67,6 +67,6 @@ public function remove($cartId)
6767
{
6868
/** @var $quoteIdMask QuoteIdMask */
6969
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
70-
return $this->couponManagement->remove($quoteIdMask->getId());
70+
return $this->couponManagement->remove($quoteIdMask->getQuoteId());
7171
}
7272
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function set($cartId, \Magento\Quote\Api\Data\PaymentInterface $method)
4646
{
4747
/** @var $quoteIdMask QuoteIdMask */
4848
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
49-
return $this->paymentMethodManagement->set($quoteIdMask->getId(), $method);
49+
return $this->paymentMethodManagement->set($quoteIdMask->getQuoteId(), $method);
5050
}
5151

5252
/**
@@ -56,7 +56,7 @@ public function get($cartId)
5656
{
5757
/** @var $quoteIdMask QuoteIdMask */
5858
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
59-
return $this->paymentMethodManagement->get($quoteIdMask->getId());
59+
return $this->paymentMethodManagement->get($quoteIdMask->getQuoteId());
6060
}
6161

6262
/**
@@ -66,6 +66,6 @@ public function getList($cartId)
6666
{
6767
/** @var $quoteIdMask QuoteIdMask */
6868
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
69-
return $this->paymentMethodManagement->getList($quoteIdMask->getId());
69+
return $this->paymentMethodManagement->getList($quoteIdMask->getQuoteId());
7070
}
7171
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function assign($cartId, \Magento\Quote\Api\Data\AddressInterface $addres
4646
{
4747
/** @var $quoteIdMask QuoteIdMask */
4848
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
49-
return $this->shippingAddressManagement->assign($quoteIdMask->getId(), $address);
49+
return $this->shippingAddressManagement->assign($quoteIdMask->getQuoteId(), $address);
5050
}
5151

5252
/**
@@ -56,6 +56,6 @@ public function get($cartId)
5656
{
5757
/** @var $quoteIdMask QuoteIdMask */
5858
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
59-
return $this->shippingAddressManagement->get($quoteIdMask->getId());
59+
return $this->shippingAddressManagement->get($quoteIdMask->getQuoteId());
6060
}
6161
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function get($cartId)
4747
{
4848
/** @var $quoteIdMask QuoteIdMask */
4949
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
50-
return $this->shippingMethodManagement->get($quoteIdMask->getId());
50+
return $this->shippingMethodManagement->get($quoteIdMask->getQuoteId());
5151
}
5252

5353
/**
@@ -57,7 +57,7 @@ public function getList($cartId)
5757
{
5858
/** @var $quoteIdMask QuoteIdMask */
5959
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
60-
return $this->shippingMethodManagement->getList($quoteIdMask->getId());
60+
return $this->shippingMethodManagement->getList($quoteIdMask->getQuoteId());
6161
}
6262

6363
/**
@@ -67,6 +67,6 @@ public function set($cartId, $carrierCode, $methodCode)
6767
{
6868
/** @var $quoteIdMask QuoteIdMask */
6969
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
70-
return $this->shippingMethodManagement->set($quoteIdMask->getId(), $carrierCode, $methodCode);
70+
return $this->shippingMethodManagement->set($quoteIdMask->getQuoteId(), $carrierCode, $methodCode);
7171
}
7272
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected function setUp()
5656
);
5757
$this->quoteIdMaskMock = $this->getMock(
5858
'Magento\Quote\Model\QuoteIdMask',
59-
['getId', 'getMaskedId', 'load', 'save', 'setId'],
59+
['getQuoteId', 'getMaskedId', 'load', 'save', 'setQuoteId'],
6060
[],
6161
'',
6262
false
@@ -76,7 +76,7 @@ public function testCreateEmptyCart()
7676
$maskedCartId = 'masked1cart2id3';
7777
$cartId = 1;
7878

79-
$this->quoteIdMaskMock->expects($this->once())->method('setId')->with($cartId)->willReturnSelf();
79+
$this->quoteIdMaskMock->expects($this->once())->method('setQuoteId')->with($cartId)->willReturnSelf();
8080
$this->quoteIdMaskMock->expects($this->once())->method('save')->willReturnSelf();
8181
$this->quoteIdMaskMock->expects($this->once())->method('getMaskedId')->willreturn($maskedCartId);
8282
$this->quoteIdMaskFactoryMock->expects($this->once())->method('create')->willReturn($this->quoteIdMaskMock);
@@ -93,7 +93,7 @@ public function testAssignCustomer()
9393
$storeId = 1;
9494

9595
$this->quoteIdMaskMock->expects($this->once())->method('load')->with($cartId, 'masked_id')->willReturnSelf();
96-
$this->quoteIdMaskMock->expects($this->once())->method('getId')->willReturn($maskedCartId);
96+
$this->quoteIdMaskMock->expects($this->once())->method('getQuoteId')->willReturn($maskedCartId);
9797
$this->quoteIdMaskFactoryMock->expects($this->once())->method('create')->willReturn($this->quoteIdMaskMock);
9898
$this->quoteManagementMock->expects($this->once())->method('assignCustomer')->willReturn(true);
9999

@@ -107,7 +107,7 @@ public function testPlaceOrder()
107107
$orderId = 1;
108108

109109
$this->quoteIdMaskMock->expects($this->once())->method('load')->with($cartId, 'masked_id')->willReturnSelf();
110-
$this->quoteIdMaskMock->expects($this->once())->method('getId')->willReturn($maskedCartId);
110+
$this->quoteIdMaskMock->expects($this->once())->method('getQuoteId')->willReturn($maskedCartId);
111111
$this->quoteIdMaskFactoryMock->expects($this->once())->method('create')->willReturn($this->quoteIdMaskMock);
112112
$this->quoteManagementMock->expects($this->once())->method('placeOrder')->willReturn($orderId);
113113

0 commit comments

Comments
 (0)