/**
  * @param $filePath
  *
  * @return string
  * @throws CopyMoveSelectionException
  */
 private function copyFileOnDisk($filePath)
 {
     $filename = basename($filePath);
     $newFileName = $this->uploadDirectoryManager->getNewPath($filename);
     $uploadDir = $this->uploadDirectoryManager->getAbsoluteUploadDir();
     if (!copy($uploadDir . $filePath, $uploadDir . $newFileName)) {
         throw new CopyMoveSelectionException('File not coppied ' . $filePath);
     }
     return $newFileName;
 }
 /**
  * @covers: RI\FileManagerBundle\Manager\UploadDirectoryManager::__construct
  * @covers: RI\FileManagerBundle\Manager\UploadDirectoryManager::getAbsoluteUploadDirPath
  * @covers: RI\FileManagerBundle\Manager\UploadDirectoryManager::getAbsoluteUploadDir
  */
 public function testGetAbsoluteUploadDir()
 {
     $this->assertEquals('/tmp/web', $this->uploadDirectoryManager->getAbsoluteUploadDir());
 }