Skip to content

Commit c66197d

Browse files
committed
MC-29130: Storefront: View configurable product on storefront
1 parent 9105b39 commit c66197d

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

dev/tests/integration/testsuite/Magento/Swatches/Block/Product/Renderer/Configurable/ProductPageViewTest.php

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -308,22 +308,6 @@ public function expectedTwoAttributesProvider(): array
308308
];
309309
}
310310

311-
/**
312-
* Generate block config data
313-
*
314-
* @return array
315-
*/
316-
protected function generateBlockJsonConfigData(): array
317-
{
318-
$product = $this->productRepository->get('configurable');
319-
$this->block->setProduct($product);
320-
$this->block->setTemplate($this->template);
321-
$jsonConfig = $this->json->unserialize($this->block->getJsonConfig())['attributes'] ?? null;
322-
$jsonSwatchConfig = $this->json->unserialize($this->block->getJsonSwatchConfig());
323-
324-
return ['json_config' => $jsonConfig, 'json_swatch_config' => $jsonSwatchConfig];
325-
}
326-
327311
/**
328312
* Check configurable product view
329313
*
@@ -339,6 +323,23 @@ protected function checkProductView($expectedConfig, $expectedSwatchConfig): voi
339323
$this->assertSwatchConfig($actualConfig['json_swatch_config'], $expectedSwatchConfig);
340324
}
341325

326+
/**
327+
* Generate block config data
328+
*
329+
* @return array
330+
*/
331+
332+
private function generateBlockJsonConfigData(): array
333+
{
334+
$product = $this->productRepository->get('configurable');
335+
$this->block->setProduct($product);
336+
$this->block->setTemplate($this->template);
337+
$jsonConfig = $this->json->unserialize($this->block->getJsonConfig())['attributes'] ?? [];
338+
$jsonSwatchConfig = $this->json->unserialize($this->block->getJsonSwatchConfig());
339+
340+
return ['json_config' => $jsonConfig, 'json_swatch_config' => $jsonSwatchConfig];
341+
}
342+
342343
/**
343344
* Assert that correct data was generated
344345
*

0 commit comments

Comments
 (0)