Expand test coverage.

This commit is contained in:
James Cole
2018-01-05 17:29:42 +01:00
parent c329ffa545
commit 3e9f98b43e
24 changed files with 1150 additions and 93 deletions

View File

@@ -37,16 +37,15 @@ class Budgets implements MapperInterface
{
/** @var BudgetRepositoryInterface $repository */
$repository = app(BudgetRepositoryInterface::class);
$result = $repository->getBudgets();
$result = $repository->getActiveBudgets();
$list = [];
/** @var Budget $budget */
foreach ($result as $budget) {
$list[$budget->id] = $budget->name;
$budgetId = intval($budget->id);
$list[$budgetId] = $budget->name;
}
asort($list);
$list = [0 => trans('import.map_do_not_map')] + $list;
$list = array_merge([0 => trans('import.map_do_not_map')], $list);
return $list;
}