public function deleteBinaryFile(BinaryFile $binaryFile)
 {
     $this->checkBinaryFileId($binaryFile->id);
     $spiUri = $this->getPrefixedUri($binaryFile->id);
     try {
         $this->metadataHandler->delete($spiUri);
     } catch (BinaryFileNotFoundException $e) {
         $this->binarydataHandler->delete($spiUri);
         throw $e;
     }
     $this->binarydataHandler->delete($spiUri);
 }
 /**
  * @expectedException \eZ\Publish\Core\IO\Exception\BinaryFileNotFoundException
  */
 public function testDeleteNotFound()
 {
     $this->filesystem->expects($this->once())->method('delete')->with('prefix/my/file.png')->will($this->throwException(new FileNotFoundException('prefix/my/file.png')));
     $this->handler->delete('prefix/my/file.png');
 }