@@ -316,13 +316,13 @@ public function testUploadFileWithWrongFile(): void
316
316
*
317
317
* @param string $directory
318
318
* @param string $filename
319
- * @param string $expectedUrl
319
+ * @param array $expectedUrls
320
320
* @return void
321
321
* @magentoAppIsolation enabled
322
322
* @magentoAppArea adminhtml
323
323
* @dataProvider getThumbnailUrlDataProvider
324
324
*/
325
- public function testGetThumbnailUrl (string $ directory , string $ filename , string $ expectedUrl ): void
325
+ public function testGetThumbnailUrl (string $ directory , string $ filename , array $ expectedUrls ): void
326
326
{
327
327
$ root = $ this ->storage ->getCmsWysiwygImages ()->getStorageRoot ();
328
328
$ directory = implode ('/ ' , array_filter ([rtrim ($ root , '/ ' ), trim ($ directory , '/ ' )]));
@@ -334,7 +334,7 @@ public function testGetThumbnailUrl(string $directory, string $filename, string
334
334
foreach ($ collection as $ item ) {
335
335
$ paths [] = parse_url ($ item ->getThumbUrl (), PHP_URL_PATH );
336
336
}
337
- $ this ->assertEquals ([ $ expectedUrl ] , $ paths );
337
+ $ this ->assertEquals ($ expectedUrls , $ paths );
338
338
$ this ->driver ->deleteFile ($ path );
339
339
}
340
340
@@ -401,17 +401,27 @@ public function getThumbnailUrlDataProvider(): array
401
401
[
402
402
'/ ' ,
403
403
'image1.png ' ,
404
- ' /media/.thumbs/image1.png '
404
+ []
405
405
],
406
406
[
407
407
'/cms ' ,
408
408
'image2.png ' ,
409
- ' /media/.thumbscms/image2.png '
409
+ []
410
410
],
411
411
[
412
412
'/cms/pages ' ,
413
413
'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 ' ]
415
425
]
416
426
];
417
427
}
0 commit comments