Skip to content

Commit ab043eb

Browse files
committed
B2B-1861: [Test] s3 - Refactor WebAPI tests to add support for Remote Storage
- fix configurable_products_with_two_attributes_combination.php fixture
1 parent a764f4d commit ab043eb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151

5252
/** @var WriteInterface $mediaDirectory */
5353
$mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
54-
$mediaPath = $mediaDirectory->getAbsolutePath();
5554
$baseTmpMediaPath = $config->getBaseTmpMediaPath();
5655
$mediaDirectory->create($baseTmpMediaPath);
5756

@@ -65,9 +64,9 @@
6564
$associatedProductIds = [];
6665
$firstAttributeValues = [];
6766
$secondAttributeValues = [];
68-
$testImagePath = __DIR__ . '/magento_image.jpg';
69-
$mediaImage = $mediaPath . '/' . $baseTmpMediaPath . '/magento_image.jpg';
70-
copy($testImagePath, $mediaImage);
67+
68+
$mediaImage = $mediaDirectory->getAbsolutePath($baseTmpMediaPath . DIRECTORY_SEPARATOR . 'magento_image.jpg');
69+
$result = $mediaDirectory->getDriver()->filePutContents($mediaImage, file_get_contents(__DIR__ . '/magento_image.jpg'));
7170

7271
array_shift($firstAttributeOptions);
7372
array_shift($secondAttributeOptions);

0 commit comments

Comments
 (0)