/** * @covers \eZ\Publish\Core\IO\Handler::update * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException */ public function testUpdateTargetExists() { $firstPath = 'images/testUpdateTargetExists-1.gif'; $secondPath = 'images/testUpdateTargetExists-2.png'; $struct = $this->getCreateStructFromLocalFile($this->imageInputPath, $firstPath); $binaryFile = $this->IOHandler->create($struct); $struct = $this->getCreateStructFromLocalFile($this->imageInputPath, $secondPath); $binaryFile = $this->IOHandler->create($struct); self::assertTrue($this->IOHandler->exists($firstPath)); self::assertTrue($this->IOHandler->exists($secondPath)); $updateStruct = new BinaryFileUpdateStruct(); $updateStruct->id = $secondPath; $this->IOHandler->update($firstPath, $updateStruct); }