Improve test coverage.

This commit is contained in:
James Cole
2019-06-10 20:14:00 +02:00
parent 8efb73694d
commit 2ab9d2e6ee
75 changed files with 4672 additions and 484 deletions

View File

@@ -49,15 +49,15 @@ class DecryptDatabase extends Command
*
* @var string
*/
protected $signature = 'firefly:decrypt-all';
protected $signature = 'firefly-iii:decrypt-all';
/**
* Execute the console command.
*
* @return mixed
* @return int
* @throws FireflyException
*/
public function handle()
public function handle(): int
{
$this->line('Going to decrypt the database.');
$tables = [
@@ -151,7 +151,7 @@ class DecryptDatabase extends Command
$value = Crypt::decrypt($value);
} catch (DecryptException $e) {
if ('The MAC is invalid.' === $e->getMessage()) {
throw new FireflyException($e->getMessage());
throw new FireflyException($e->getMessage()); // @codeCoverageIgnore
}
Log::debug(sprintf('Could not decrypt. %s', $e->getMessage()));
}