function it_should_execute_the_decompression_command(Compressor $compressor, ShellProcessor $shellProcessor) { $compressor->getDecompressCommandLine('path')->willReturn('decompress path'); $shellProcessor->process('decompress path')->shouldBeCalled(); $this->beConstructedWith($compressor, 'path', $shellProcessor); $this->execute(); }
function it_should_execute_the_database_restore_command(Database $database, ShellProcessor $shellProcessor) { $database->getRestoreCommandLine('path')->willReturn('restore path'); $shellProcessor->process('restore path')->shouldBeCalled(); $this->beConstructedWith($database, 'path', $shellProcessor); $this->execute(); }
/** * @throws \BigName\BackupManager\ShellProcessing\ShellProcessFailed */ public function execute() { return $this->shellProcessor->process($this->compressor->getCompressCommandLine($this->sourcePath)); }
/** * @throws \BigName\BackupManager\ShellProcessing\ShellProcessFailed */ public function execute() { return $this->shellProcessor->process($this->database->getDumpCommandLine($this->outputPath)); }
/** * @throws \BigName\BackupManager\ShellProcessing\ShellProcessFailed */ public function execute() { return $this->shellProcessor->process($this->database->getRestoreCommandLine($this->inputPath)); }