/** * Deletes $binaryFile * * @param \eZ\Publish\Core\IO\Values\BinaryFile $binaryFile * * @throws InvalidArgumentValue */ public function deleteBinaryFile(BinaryFile $binaryFile) { if (empty($binaryFile->id) || !is_string($binaryFile->id)) { throw new InvalidArgumentValue("binaryFileId", $binaryFile->id, "BinaryFile"); } $this->ioHandler->delete($this->getPrefixedUri($binaryFile->id)); }
/** * @covers \eZ\Publish\Core\IO\Handler::delete * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException */ public function testDeleteNonExistingFile() { $this->IOHandler->delete('images/deleteNonExisting.gif'); }