Skip to content

Commit 3c40e61

Browse files
author
Oleksandr Dubovyk
committed
MC-19013: Scheduled update is not created by the admin from not default site
- fixed not related issue integration test that failed due to lack of isolation
1 parent afb6798 commit 3c40e61

File tree

1 file changed

+9
-3
lines changed
  • dev/tests/integration/testsuite/Magento/Sales/_files

1 file changed

+9
-3
lines changed

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
use Magento\Quote\Model\QuoteFactory;
99
use Magento\Quote\Model\QuoteRepository;
10+
use Magento\Store\Api\Data\StoreInterface;
11+
use Magento\Store\Model\StoreManager;
1012
use Magento\TestFramework\Helper\Bootstrap;
1113
use Magento\TestFramework\ObjectManager;
1214

@@ -18,18 +20,22 @@
1820
$quoteFactory = $objectManager->get(QuoteFactory::class);
1921
/** @var QuoteRepository $quoteRepository */
2022
$quoteRepository = $objectManager->get(QuoteRepository::class);
23+
/** @var StoreManager $storeManager */
24+
$storeManager = $objectManager->get(StoreManager::class);
2125

2226
$quotes = [
2327
'quote for first store' => [
24-
'store' => 1,
28+
'store' => 'default',
2529
],
2630
'quote for second store' => [
27-
'store' => 2,
31+
'store' => 'fixture_second_store',
2832
],
2933
];
3034

3135
foreach ($quotes as $quoteData) {
3236
$quote = $quoteFactory->create();
33-
$quote->setStoreId($quoteData['store']);
37+
/** @var StoreInterface $store */
38+
$store = $storeManager->getStore($quoteData['store']);
39+
$quote->setStoreId($store->getId());
3440
$quoteRepository->save($quote);
3541
}

0 commit comments

Comments
 (0)