/**
  * @test
  */
 public function deleteAttachment()
 {
     $pathname = 'some/path/file.ext';
     $filename = 'file.ext';
     $attachment = new Attachment(new File($pathname));
     $this->fileStorageService->expects($this->once())->method('remove')->with($this->equalTo($filename));
     $this->repository->expects($this->once())->method('remove')->with($this->equalTo($attachment));
     $this->manager->deleteAttachment($attachment);
 }
 /**
  * @param    string $prefix
  * @return   string
  */
 protected function getDestination($prefix)
 {
     $folder = $this->fileStorageService->getConfiguredUploadDir();
     return $folder . '/' . $prefix;
 }