Skip to content

Commit 1265d9c

Browse files
committed
MAGETWO-60103: [Backport] Configurable variation is displayed on category/product page when is out of stock - 2.1
1 parent 24fed2a commit 1265d9c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/order_item_with_configurable_and_options.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Copyright © 2016 Magento. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
use Magento\TestFramework\Helper\Bootstrap;
7+
use Magento\Catalog\Api\ProductRepositoryInterface;
68

79
require 'product_configurable.php';
810

@@ -20,8 +22,8 @@
2022
$payment->setMethod('checkmo');
2123

2224
/** @var $product \Magento\Catalog\Model\Product */
23-
$product = $objectManager->create('Magento\Catalog\Model\Product');
24-
$product->load(1);
25+
$productRepository = Bootstrap::getObjectManager()->create(ProductRepositoryInterface::class);
26+
$product = $productRepository->get('configurable');
2527

2628
/** @var $attribute \Magento\Catalog\Model\ResourceModel\Eav\Attribute */
2729
$eavConfig = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Eav\Model\Config');

0 commit comments

Comments
 (0)