Skip to content

Commit 9b9d123

Browse files
improve test
1 parent a892a19 commit 9b9d123

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Product/View/Type/MultiStoreConfigurableViewOnProductPageTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,11 @@ public function assertProductConfig($expectedProducts): void
182182
*/
183183
private function prepareConfigurableProduct(string $sku, string $storeCode): void
184184
{
185-
$store = $this->storeManager->getStore($storeCode);
186185
$product = $this->productRepository->get($sku, false, null, true);
187186
$productToUpdate = $product->getTypeInstance()->getUsedProductCollection($product)
188-
->addStoreFilter($store)->setPageSize(1)->getFirstItem();
187+
->addStoreFilter($storeCode)
188+
->setPageSize(1)
189+
->getFirstItem();
189190

190191
$this->assertNotEmpty($productToUpdate->getData(), 'Configurable product does not have a child');
191192
$this->executeInStoreContext->execute($storeCode, [$this, 'setProductDisabled'], $productToUpdate);

0 commit comments

Comments
 (0)