From f5add55f10cf07bcb004fcedb06c278c37ab891d Mon Sep 17 00:00:00 2001 From: Oliver Matla Date: Thu, 5 Sep 2024 05:06:33 +0200 Subject: [PATCH] extend the fail check to cater for the new wipe --- tests/feature/ImportDumpTest.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/feature/ImportDumpTest.php b/tests/feature/ImportDumpTest.php index c4c1272..ed32143 100644 --- a/tests/feature/ImportDumpTest.php +++ b/tests/feature/ImportDumpTest.php @@ -4,6 +4,7 @@ use Cybex\Protector\Exceptions\FailedImportException; use Cybex\Protector\Exceptions\FailedMysqlCommandException; +use Cybex\Protector\Exceptions\FailedWipeException; use Cybex\Protector\Exceptions\FileNotFoundException; use Cybex\Protector\Exceptions\InvalidConnectionException; use Cybex\Protector\Exceptions\InvalidEnvironmentException; @@ -166,8 +167,12 @@ public function throwsExceptionOnMysqlFailedShellCommand() $this->protector->withConnectionName(null); - $this->expectException(FailedImportException::class); + $this->expectException(FailedWipeException::class); $this->protector->importDump($this->filePath); + + // Without wiping the database, we expect the import to fail instead. + $this->expectException(FailedImportException::class); + $this->protector->importDump($this->filePath, ['no-wipe' => true]); } /**