Skip to content

Commit ffe036f

Browse files
committed
B2B-1876: New directories in pub/media do not get synced back to local filesystem from S3 Remote Storage
1 parent 4d59811 commit ffe036f

File tree

1 file changed

+16
-6
lines changed
  • dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images

1 file changed

+16
-6
lines changed

dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,13 +316,13 @@ public function testUploadFileWithWrongFile(): void
316316
*
317317
* @param string $directory
318318
* @param string $filename
319-
* @param string $expectedUrl
319+
* @param array $expectedUrls
320320
* @return void
321321
* @magentoAppIsolation enabled
322322
* @magentoAppArea adminhtml
323323
* @dataProvider getThumbnailUrlDataProvider
324324
*/
325-
public function testGetThumbnailUrl(string $directory, string $filename, string $expectedUrl): void
325+
public function testGetThumbnailUrl(string $directory, string $filename, array $expectedUrls): void
326326
{
327327
$root = $this->storage->getCmsWysiwygImages()->getStorageRoot();
328328
$directory = implode('/', array_filter([rtrim($root, '/'), trim($directory, '/')]));
@@ -334,7 +334,7 @@ public function testGetThumbnailUrl(string $directory, string $filename, string
334334
foreach ($collection as $item) {
335335
$paths[] = parse_url($item->getThumbUrl(), PHP_URL_PATH);
336336
}
337-
$this->assertEquals([$expectedUrl], $paths);
337+
$this->assertEquals($expectedUrls, $paths);
338338
$this->driver->deleteFile($path);
339339
}
340340

@@ -401,17 +401,27 @@ public function getThumbnailUrlDataProvider(): array
401401
[
402402
'/',
403403
'image1.png',
404-
'/media/.thumbs/image1.png'
404+
[]
405405
],
406406
[
407407
'/cms',
408408
'image2.png',
409-
'/media/.thumbscms/image2.png'
409+
[]
410410
],
411411
[
412412
'/cms/pages',
413413
'image3.png',
414-
'/media/.thumbscms/pages/image3.png'
414+
[]
415+
],
416+
[
417+
'/MagentoCmsModelWysiwygImagesStorageTest',
418+
'image2.png',
419+
['/media/.thumbsMagentoCmsModelWysiwygImagesStorageTest/image2.png']
420+
],
421+
[
422+
'/MagentoCmsModelWysiwygImagesStorageTest/pages',
423+
'image3.png',
424+
['/media/.thumbsMagentoCmsModelWysiwygImagesStorageTest/pages/image3.png']
415425
]
416426
];
417427
}

0 commit comments

Comments
 (0)