Skip to content

Commit f5add55

Browse files
committed
extend the fail check to cater for the new wipe
1 parent 5a7c3b0 commit f5add55

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/feature/ImportDumpTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Cybex\Protector\Exceptions\FailedImportException;
66
use Cybex\Protector\Exceptions\FailedMysqlCommandException;
7+
use Cybex\Protector\Exceptions\FailedWipeException;
78
use Cybex\Protector\Exceptions\FileNotFoundException;
89
use Cybex\Protector\Exceptions\InvalidConnectionException;
910
use Cybex\Protector\Exceptions\InvalidEnvironmentException;
@@ -166,8 +167,12 @@ public function throwsExceptionOnMysqlFailedShellCommand()
166167

167168
$this->protector->withConnectionName(null);
168169

169-
$this->expectException(FailedImportException::class);
170+
$this->expectException(FailedWipeException::class);
170171
$this->protector->importDump($this->filePath);
172+
173+
// Without wiping the database, we expect the import to fail instead.
174+
$this->expectException(FailedImportException::class);
175+
$this->protector->importDump($this->filePath, ['no-wipe' => true]);
171176
}
172177

173178
/**

0 commit comments

Comments
 (0)