Beispiel #1
0
 public function aroundSaveFileToFilesystem(Database $subject, $proceed, $filename)
 {
     if ($subject->checkDbUsage() && $this->helper->checkS3Usage()) {
         $file = $subject->getStorageDatabaseModel()->loadByFilename($subject->getMediaRelativePath($filename));
         if (!$file->getId()) {
             return false;
         }
         return $subject->getStorageFileModel()->saveFile($file->getData(), true);
     }
     return $proceed($filename);
 }
Beispiel #2
0
 public function testGetStorageFileModel()
 {
     $this->assertSame($this->fileStorageMock, $this->helper->getStorageFileModel());
 }