@@ -75,7 +75,6 @@ public function testVariations()
75
75
76
76
$ this ->assertValidVariations ();
77
77
$ this ->assertWithOutOfStockVariation ($ productRepository , $ product );
78
- $ this ->assertWithDeletedVariation ($ productRepository , $ product );
79
78
}
80
79
81
80
/**
@@ -158,16 +157,18 @@ private function assertWithOutOfStockVariation(
158
157
/**
159
158
* Assert reorder with "out of stock" variation.
160
159
*
161
- * @param \Magento\Catalog\Api\ProductRepositoryInterface $productRepository
162
- * @param \Magento\Catalog\Api\Data\ProductInterface $product
160
+ * @magentoApiDataFixture Magento/Sales/_files/order_with_two_configurable_variations.php
163
161
* @return void
164
162
* @throws \Magento\Framework\Exception\StateException
165
163
* @throws NoSuchEntityException
166
164
*/
167
- private function assertWithDeletedVariation (
168
- \Magento \Catalog \Api \ProductRepositoryInterface $ productRepository ,
169
- \Magento \Catalog \Api \Data \ProductInterface $ product
170
- ): void {
165
+ public function testWithDeletedVariation (): void {
166
+ /** @var \Magento\Catalog\Api\ProductRepositoryInterface $repository */
167
+ $ productRepository = Bootstrap::getObjectManager ()
168
+ ->create (\Magento \Catalog \Api \ProductRepositoryInterface::class);
169
+ $ productSku = 'simple_20 ' ;
170
+ /** @var \Magento\Catalog\Api\Data\ProductInterface $product */
171
+ $ product = $ productRepository ->get ($ productSku );
171
172
// delete a product and make reorder
172
173
/** @var \Magento\Framework\Registry $registry */
173
174
$ registry = Bootstrap::getObjectManager ()
0 commit comments