File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
dev/tests/integration/testsuite/Magento/MediaStorage/Model/File Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 6
6
namespace Magento \MediaStorage \Model \File ;
7
7
8
8
use Magento \Framework \App \Filesystem \DirectoryList ;
9
+ use Magento \Framework \Filesystem \Driver \File ;
9
10
10
11
class StorageTest extends \PHPUnit \Framework \TestCase
11
12
{
@@ -27,10 +28,11 @@ public function testGetScriptConfig()
27
28
$ filesystem = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ()->get (
28
29
\Magento \Framework \Filesystem::class
29
30
);
30
- $ this ->assertEquals (
31
- $ filesystem ->getDirectoryRead (DirectoryList::MEDIA )->getAbsolutePath (),
32
- $ config ['media_directory ' ]
33
- );
31
+
32
+ $ mediaDirectory = $ filesystem ->getDirectoryWrite (DirectoryList::MEDIA );
33
+ if ($ mediaDirectory ->getDriver () instanceof File) {
34
+ $ this ->assertEquals ($ config ['media_directory ' ], $ mediaDirectory ->getAbsolutePath ());
35
+ }
34
36
$ this ->assertIsArray ($ config ['allowed_resources ' ]);
35
37
$ this ->assertContains ('css ' , $ config ['allowed_resources ' ]);
36
38
$ this ->assertContains ('css_secure ' , $ config ['allowed_resources ' ]);
You can’t perform that action at this time.
0 commit comments