Skip to content

Commit d108146

Browse files
committed
MC-38613: Support by Magento CatalogGraphQl
1 parent 4b7bffa commit d108146

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

dev/tests/integration/testsuite/Magento/Swatches/_files/visual_swatch_attribute_with_different_options_type.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
$imagesGenerator = Bootstrap::getObjectManager()->get(ImagesGenerator::class);
2525
/** @var SwatchesMedia $swatchesMedia */
2626
$swatchesMedia = Bootstrap::getObjectManager()->get(SwatchesMedia::class);
27-
$imageName = 'visual_swatch_attribute_option_type_image.jpg';
27+
$imageName = '/visual_swatch_attribute_option_type_image.jpg';
2828
$imagesGenerator->generate([
2929
'image-width' => 110,
3030
'image-height' => 90,

setup/src/Magento/Setup/Fixtures/ImagesGenerator/ImagesGenerator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ public function generate($config)
7171
$mediaDirectory->create($relativePathToMedia);
7272

7373
$imagePath = $relativePathToMedia . DIRECTORY_SEPARATOR . $config['image-name'];
74+
$imagePath = preg_replace('|/{2,}|', '/', $imagePath);
7475
$memory = fopen('php://memory', 'r+');
7576
if(!imagejpeg($image, $memory)) {
7677
throw new \Exception('Could not create picture ' . $imagePath);

0 commit comments

Comments
 (0)