Skip to content

Commit 0aef93b

Browse files
author
Alex Paliarush
committed
MAGETWO-69775: [Magento Cloud] Discount based off customer segments not applying to orders created in admin
1 parent 2c89e48 commit 0aef93b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@
1313
/** @var \Magento\Customer\Api\CustomerRepositoryInterface $customer */
1414
$customerRepository = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
1515
->create(\Magento\Customer\Api\CustomerRepositoryInterface::class);
16-
$customer = $customerRepository->getById(1);
16+
$customerId = 1;
17+
$customer = $customerRepository->getById($customerId);
1718
$quote->setCustomer($customer)->setCustomerIsGuest(false)->save();
19+
foreach ($quote->getAllAddresses() as $address) {
20+
$address->setCustomerId($customerId)->save();
21+
}
1822

1923
/** @var \Magento\Quote\Model\QuoteIdMask $quoteIdMask */
2024
$quoteIdMask = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()

0 commit comments

Comments
 (0)