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

@@ -333,6 +333,9 @@ abstract class TestCase extends BaseTestCase
DB::raw('COUNT(transaction_journal_id) as ct'),
]
)->first();
if(null === $result) {
throw new FireflyException(sprintf('Cannot find suitable %s to use.', $type));
}
return TransactionJournal::find((int)$result->transaction_journal_id);
}