Skip to content

Commit 4c1266c

Browse files
Chhandak.BaruaChhandak.Barua
authored andcommitted
ACP2E-59: Importing Bundle with '?' in the option title corrupts how option is displayed and prevents product from being added to cart
1 parent d9b8b7d commit 4c1266c

File tree

1 file changed

+6
-7
lines changed
  • dev/tests/integration/testsuite/Magento/BundleImportExport/Model/Import/Product/Type

1 file changed

+6
-7
lines changed

dev/tests/integration/testsuite/Magento/BundleImportExport/Model/Import/Product/Type/BundleTest.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -209,15 +209,14 @@ public function testBundleImportUpdateValuesWithQuestionMark(): void
209209
$productId = $resource->getIdBySku(self::TEST_PRODUCT_NAME);
210210
$this->assertIsNumeric($productId);
211211
/** @var Product $product */
212-
$product = $this->objectManager->create(ProductRepository::class);
213-
$product->load($productId);
212+
$product = $this->objectManager->create(ProductRepositoryInterface::class);
213+
$ProductRepository = $product->get(self::TEST_PRODUCT_NAME);
214214

215-
$this->assertFalse($product->isObjectNew());
216-
$this->assertEquals(self::TEST_PRODUCT_NAME, $product->getName());
217-
$this->assertEquals(self::TEST_PRODUCT_TYPE, $product->getTypeId());
218-
$this->assertEquals(1, $product->getShipmentType());
215+
$this->assertEquals(self::TEST_PRODUCT_NAME, $ProductRepository->getName());
216+
$this->assertEquals(self::TEST_PRODUCT_TYPE, $ProductRepository->getTypeId());
217+
$this->assertEquals(1, $ProductRepository->getShipmentType());
219218

220-
$bundleOptionCollection = $product->getExtensionAttributes()->getBundleProductOptions();
219+
$bundleOptionCollection = $ProductRepository->getExtensionAttributes()->getBundleProductOptions();
221220
$this->assertCount(1, $bundleOptionCollection);
222221

223222
$this->importedProductSkus = ['Simple 1', 'Bundle 1'];

0 commit comments

Comments
 (0)