Expand test coverage.

This commit is contained in:
James Cole
2018-09-30 11:57:51 +02:00
parent ea5ab54c3a
commit e33bbc6f16
9 changed files with 746 additions and 408 deletions

View File

@@ -193,9 +193,11 @@ class ImportArrayStorage
unset($transaction['importHashV2'], $transaction['original-source']);
$json = json_encode($transaction);
if (false === $json) {
// @codeCoverageIgnoreStart
/** @noinspection ForgottenDebugOutputInspection */
Log::error('Could not encode import array.', print_r($transaction, true));
throw new FireflyException('Could not encode import array. Please see the logs.'); // @codeCoverageIgnore
throw new FireflyException('Could not encode import array. Please see the logs.');
// @codeCoverageIgnoreEnd
}
$hash = hash('sha256', $json, false);
Log::debug(sprintf('The hash is: %s', $hash));