/** * @param string $dbCode * @throws LocalizedException */ protected function unpackDb($dbCode) { $this->archive->unpack($this->directory->getAbsolutePath($this->getDbArchiveFilePath($dbCode)), $this->directory->getAbsolutePath($this->database->getDbPath($dbCode))); if (!$this->directory->isExist($this->database->getDbPath($dbCode))) { throw new LocalizedException(__('Cannot unpack db file.')); } }
protected function configureUnpack($dbPath, $dbArchPath, $dbPathAbsolute, $dbArchPathAbsolute) { $this->directory->expects($this->exactly(2))->method('getAbsolutePath')->willReturnMap([[$dbPath, $dbPathAbsolute], [$dbArchPath, $dbArchPathAbsolute]]); $this->archive->expects($this->once())->method('unpack')->with($dbArchPathAbsolute, $dbPathAbsolute); }