/**
  * @expectedException \eZ\Publish\Core\IO\Exception\BinaryFileNotFoundException
  */
 public function testDeleteNotFound()
 {
     $statement = $this->createDbalStatementMock();
     $statement->expects($this->once())->method('rowCount')->will($this->returnValue(0));
     $this->dbalMock->expects($this->once())->method('prepare')->with($this->anything())->will($this->returnValue($statement));
     $this->handler->delete('prefix/my/file.png');
 }
 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);
 }
 public function testDelete()
 {
     $this->filesystem->expects($this->never())->method('delete');
     $this->handler->delete('prefix/my/file.png');
 }
 public function testDelete()
 {
     $this->handler->delete('prefix/my/file.png');
 }