Skip to content

Commit 3654955

Browse files
committed
B2B-2052: Image Uploader always uses full remote filesystem
1 parent b66efca commit 3654955

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dev/tests/integration/testsuite/Magento/Framework/File/MediaStorageUploaderTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
use Magento\Customer\Model\FileProcessor;
1111
use Magento\Framework\App\Filesystem\DirectoryList;
12+
use Magento\Framework\Filesystem\Driver\File;
1213

1314
/**
1415
* Test for \Magento\MediaStorage\Model\File\Uploader
@@ -90,7 +91,7 @@ public function testUploadFileWithExcessiveFolderName(): void
9091
}
9192

9293
/**
93-
* Upload file test when `Old Media Gallery` is disabled
94+
* Upload file test to 'var' directory
9495
*
9596
* @magentoConfigFixture system/media_gallery/enabled 1
9697
* @magentoAppArea adminhtml
@@ -117,7 +118,7 @@ public function testUploadFileToVar(): void
117118
$uploader->save($destinationDirectory->getAbsolutePath($destinationDir));
118119

119120
// Uploader doesn't save file to local var if remote storage is configured
120-
if ($this->filesystem->getDirectoryWrite(DirectoryList::MEDIA)->getDriver() instanceof Filesystem\Driver\File) {
121+
if ($this->filesystem->getDirectoryWrite(DirectoryList::MEDIA)->getDriver() instanceof File) {
121122
$this->assertTrue($destinationDirectory->isFile($destinationDir . DIRECTORY_SEPARATOR . $fileName));
122123
} else {
123124
$this->assertFalse($destinationDirectory->isFile($destinationDir . DIRECTORY_SEPARATOR . $fileName));

0 commit comments

Comments
 (0)