Skip to content

Commit 9f9355f

Browse files
author
Maksym Aposov
committed
MAGETWO-38347: Second product from bundle product is ordered as separate item after checkout
1 parent b6f626f commit 9f9355f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

dev/tests/integration/testsuite/Magento/Sales/_files/quote_with_bundle.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,16 +166,9 @@
166166
);
167167
$billingAddress->setAddressType('billing');
168168

169-
/** @var $rate \Magento\Quote\Model\Quote\Address\Rate */
170-
$rate = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Quote\Model\Quote\Address\Rate');
171-
$rate->setCode('freeshipping_freeshipping');
172-
$rate->getPrice(1);
173-
174169
/** @var Magento\Quote\Model\Quote\Address $shippingAddress */
175170
$shippingAddress = clone $billingAddress;
176171
$shippingAddress->setId(null)->setAddressType('shipping');
177-
$shippingAddress->setShippingMethod('freeshipping_freeshipping');
178-
$shippingAddress->addShippingRate($rate);
179172

180173
/** @var \Magento\Quote\Model\Quote $quote */
181174
$quote = $objectManager->create('Magento\Quote\Model\Quote');
@@ -197,6 +190,13 @@
197190
$product, $buyRequest
198191
);
199192

193+
/** @var $rate \Magento\Quote\Model\Quote\Address\Rate */
194+
$rate = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Quote\Model\Quote\Address\Rate');
195+
$rate->setCode('freeshipping_freeshipping');
196+
$rate->getPrice(1);
197+
$quote->getShippingAddress()->setShippingMethod('freeshipping_freeshipping');
198+
$quote->getShippingAddress()->addShippingRate($rate);
199+
200200
$quote->getPayment()->setMethod('checkmo');
201201
$quote->collectTotals();
202202
$quote->save();

0 commit comments

Comments
 (0)