/** * @param string $sourceIdentifier * @param string $targetIdentifier * @throws \TYPO3\CMS\Core\Exception */ protected function copy($sourceIdentifier, $targetIdentifier) { try { $this->blobRestProxy->copyBlob($this->container, $targetIdentifier, $this->container, $sourceIdentifier); } catch (ServiceException $e) { $flashMessage = $this->getFlashMessage($e); $this->getMessageQueueByIdentifier()->enqueue($flashMessage); } }
/** * @return void */ public function testRenameFileCallsCopyAndDelete() { $this->storageDriver->renameFile('foo/bar/baz.txt', 'bum.txt'); $this->blobRestProxy->copyBlob(Arg::any(), 'foo/bar/bum.txt', Arg::any(), 'foo/bar/baz.txt')->shouldHaveBeenCalled(); $this->blobRestProxy->deleteBlob(Arg::any(), 'foo/bar/baz.txt')->shouldHaveBeenCalled(); }