File tree 1 file changed +7
-5
lines changed
dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images
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
98
98
$ fileName = 'magento_image.jpg ' ;
99
99
$ imagePath = realpath (__DIR__ . '/../../../../Catalog/_files/ ' . $ fileName );
100
100
$ mediaDirectory = $ this ->filesystem ->getDirectoryWrite (DirectoryList::MEDIA );
101
- $ modifiableFilePath = $ mediaDirectory ->getAbsolutePath ($ fileName );
101
+ $ modifiableFilePath = $ mediaDirectory ->getAbsolutePath (' MagentoCmsModelWysiwygImagesStorageTest/ ' . $ fileName );
102
102
$ this ->driver ->copy (
103
103
$ imagePath ,
104
104
$ modifiableFilePath
105
105
);
106
- $ collection = $ this ->storage ->getFilesCollection (self ::$ _baseDir , 'media ' );
106
+ $ this ->storage ->resizeFile ($ modifiableFilePath );
107
+ $ collection = $ this ->storage ->getFilesCollection (self ::$ _baseDir , 'image ' );
107
108
$ this ->assertInstanceOf (\Magento \Cms \Model \Wysiwyg \Images \Storage \Collection::class, $ collection );
108
109
foreach ($ collection as $ item ) {
109
110
$ this ->assertInstanceOf (\Magento \Framework \DataObject::class, $ item );
110
111
$ 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 ' ,
113
115
$ item ->getThumbUrl ()
114
116
);
115
117
$ this ->assertEquals (
116
- 'jpg ' ,
118
+ 'image/jpeg ' ,
117
119
$ item ->getMimeType ()
118
120
);
119
121
return ;
You can’t perform that action at this time.
0 commit comments