X-Git-Url: http://source.bookstackapp.com/system-cli/blobdiff_plain/321f712b65a0b84708c345e024f6f428dfae6f17..a96a9aa62fb0c274ea697284177a7484a3f968d8:/tests/Commands/RestoreCommandTest.php diff --git a/tests/Commands/RestoreCommandTest.php b/tests/Commands/RestoreCommandTest.php index 868b9ae..17b9dd5 100644 --- a/tests/Commands/RestoreCommandTest.php +++ b/tests/Commands/RestoreCommandTest.php @@ -167,6 +167,18 @@ class RestoreCommandTest extends TestCase exec('rm -rf /symlinks'); } + public function test_restore_with_invalid_zip_path_shows_warning() + { + chdir('/var/www/bookstack'); + + $result = $this->runCommand('restore', [ + 'backup-zip' => '/cats/dogs.zip', + '--app-directory' => '/var/www/bookstack', + ]); + + $result->assertStderrContains("Could not find ZIP file for restoration at provided path [/cats/dogs.zip]."); + } + protected function buildZip(callable $builder): string { $zipFile = tempnam(sys_get_temp_dir(), 'cli-test');