Skip to content

Commit

Permalink
extend the fail check to cater for the new wipe
Browse files Browse the repository at this point in the history
  • Loading branch information
lupinitylabs committed Sep 5, 2024
1 parent 5a7c3b0 commit f5add55
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/feature/ImportDumpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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]);
}

/**
Expand Down

0 comments on commit f5add55

Please sign in to comment.