public function testDeleteDocumentBackup() { $docName = 'somename'; $this->adapter->expects($this->once())->method('deleteBackup')->with('pfx_' . $docName); $this->config->expects($this->once())->method('getOption')->with('dest_prefix')->will($this->returnValue('pfx_')); $this->resourceDestination->deleteDocumentBackup($docName); }
/** * Delete backed up documents * @return void */ public function deleteBackups() { foreach (array_keys($this->readerGroups->getGroup('documents')) as $documentName) { $documentName = $this->map->getDocumentMap($documentName, MapInterface::TYPE_SOURCE); if ($documentName) { $this->destination->deleteDocumentBackup($documentName); } } }