File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -98,22 +98,24 @@ public function testGetFilesCollection(): void
9898 $ fileName = 'magento_image.jpg ' ;
9999 $ imagePath = realpath (__DIR__ . '/../../../../Catalog/_files/ ' . $ fileName );
100100 $ mediaDirectory = $ this ->filesystem ->getDirectoryWrite (DirectoryList::MEDIA );
101- $ modifiableFilePath = $ mediaDirectory ->getAbsolutePath ($ fileName );
101+ $ modifiableFilePath = $ mediaDirectory ->getAbsolutePath (' MagentoCmsModelWysiwygImagesStorageTest/ ' . $ fileName );
102102 $ this ->driver ->copy (
103103 $ imagePath ,
104104 $ modifiableFilePath
105105 );
106- $ collection = $ this ->storage ->getFilesCollection (self ::$ _baseDir , 'media ' );
106+ $ this ->storage ->resizeFile ($ modifiableFilePath );
107+ $ collection = $ this ->storage ->getFilesCollection (self ::$ _baseDir , 'image ' );
107108 $ this ->assertInstanceOf (\Magento \Cms \Model \Wysiwyg \Images \Storage \Collection::class, $ collection );
108109 foreach ($ collection as $ item ) {
109110 $ this ->assertInstanceOf (\Magento \Framework \DataObject::class, $ item );
110111 $ this ->assertStringEndsWith ('/ ' . $ fileName , $ item ->getUrl ());
111- $ this ->assertStringMatchesFormat (
112- 'http://%s/static/%s/adminhtml/%s/%s/Magento_Cms/images/magento_image.jpg ' ,
112+ $ this ->assertMatchesRegularExpression (
113+ '/.thumbsMagentoCmsModelWysiwygImagesStorageTest/ ' ,
114+ 'http://%s/pub/%s/.thumbsMagentoCmsModelWysiwygImagesStorageTest/magento_image.jpg ' ,
113115 $ item ->getThumbUrl ()
114116 );
115117 $ this ->assertEquals (
116- 'jpg ' ,
118+ 'image/jpeg ' ,
117119 $ item ->getMimeType ()
118120 );
119121 return ;
You can’t perform that action at this time.
0 commit comments