Skip to content

Commit 7595816

Browse files
committed
MAGETWO-53792: Build stabilization for PR
1 parent 8796164 commit 7595816

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

dev/tests/integration/testsuite/Magento/Paypal/_files/quote_payment_express.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
1,
1919
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
2020
);
21+
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
2122
/** @var $product \Magento\Catalog\Model\Product */
22-
$product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Catalog\Model\Product');
23+
$product = $objectManager->create('Magento\Catalog\Model\Product');
2324
$product->setTypeId('simple')
2425
->setId(1)
2526
->setAttributeSetId(4)
@@ -67,11 +68,11 @@
6768
$shippingAddress->setCollectShippingRates(true);
6869

6970
/** @var $quote \Magento\Quote\Model\Quote */
70-
$quote = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Quote\Model\Quote');
71+
$quote = $objectManager->create('Magento\Quote\Model\Quote');
7172
$quote->setCustomerIsGuest(
7273
true
7374
)->setStoreId(
74-
\Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
75+
$objectManager->get(
7576
'Magento\Store\Model\StoreManagerInterface'
7677
)->getStore()->getId()
7778
)->setReservedOrderId(
@@ -87,8 +88,10 @@
8788
$quote->getShippingAddress()->setShippingMethod('flatrate_flatrate');
8889
$quote->getShippingAddress()->setCollectShippingRates(true);
8990
$quote->getPayment()->setMethod(\Magento\Paypal\Model\Config::METHOD_WPS_EXPRESS);
90-
$quote->collectTotals()->save();
9191

92+
$quoteRepository = $objectManager->get(\Magento\Quote\Api\CartRepositoryInterface::class);
93+
$quoteRepository->save($quote);
94+
$quote = $quoteRepository->get($quote->getId());
9295
$quote->setCustomerEmail('[email protected]');
9396

9497
/** @var $service \Magento\Quote\Api\CartManagementInterface */

0 commit comments

Comments
 (0)