Skip to content

Commit b12c9dd

Browse files
Indrani sonawaneIndrani sonawane
authored andcommitted
Fixed WebAPI test failures
1 parent ecb76eb commit b12c9dd

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Bundle/AddBundleProductToCartTest.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
use Magento\Quote\Model\QuoteIdToMaskedQuoteIdInterface;
1919
use Magento\Quote\Model\ResourceModel\Quote as QuoteResource;
2020
use Magento\TestFramework\Fixture\DataFixture;
21+
use Magento\TestFramework\Fixture\DataFixtureStorage;
22+
use Magento\TestFramework\Fixture\DataFixtureStorageManager;
2123

2224
/**
2325
* Test adding bundled products to cart
@@ -44,6 +46,11 @@ class AddBundleProductToCartTest extends GraphQlAbstract
4446
*/
4547
private $productRepository;
4648

49+
/**
50+
* @var DataFixtureStorage
51+
*/
52+
private $fixtures;
53+
4754
/**
4855
* @inheritdoc
4956
*/
@@ -54,6 +61,7 @@ protected function setUp(): void
5461
$this->quote = $objectManager->create(Quote::class);
5562
$this->quoteIdToMaskedId = $objectManager->get(QuoteIdToMaskedQuoteIdInterface::class);
5663
$this->productRepository = $objectManager->get(ProductRepositoryInterface::class);
64+
$this->fixtures = $objectManager->get(DataFixtureStorageManager::class)->getStorage();
5765
}
5866

5967
/**
@@ -413,7 +421,8 @@ public function testAddBundleToCartWithEmptyMultiselectOptionValue()
413421
'reserved_order_id'
414422
);
415423
$sku = 'bundle-product-multiselect-checkbox-options';
416-
$product = $this->productRepository->get($sku);
424+
425+
$product = $this->fixtures->get($sku);
417426

418427
/** @var $typeInstance \Magento\Bundle\Model\Product\Type */
419428
$typeInstance = $product->getTypeInstance();

0 commit comments

Comments
 (0)