Improve test coverage.

This commit is contained in:
James Cole
2019-07-25 14:19:49 +02:00
parent ee95606ec0
commit 6ff4a0b45c
61 changed files with 822 additions and 599 deletions

View File

@@ -46,11 +46,13 @@ class BudgetList implements BinderInterface
//Log::debug(sprintf('Now in BudgetList::routeBinder("%s")', $value));
if (auth()->check()) {
$list = array_unique(array_map('\intval', explode(',', $value)));
//Log::debug('List is now', $list);
// @codeCoverageIgnoreStart
if (0 === count($list)) {
Log::warning('Budget list count is zero, return 404.');
throw new NotFoundHttpException; // @codeCoverageIgnore
throw new NotFoundHttpException;
}
// @codeCoverageIgnoreEnd
/** @var Collection $collection */
$collection = auth()->user()->budgets()