Fixed tests to account for issue fixed by #1097

This commit is contained in:
James Cole
2018-01-06 07:33:30 +01:00
parent ed0e14aee5
commit 7fa937e80b
18 changed files with 66 additions and 53 deletions

View File

@@ -53,8 +53,9 @@ class AssetAccountIbans implements MapperInterface
$list[$accountId] = $account->name;
}
}
$list = array_merge($topList, $list);
$list = array_merge([0 => trans('import.map_do_not_map')], $list);
$list = $topList + $list;
asort($list);
$list = [0 => trans('import.map_do_not_map')] + $list;
return $list;
}

View File

@@ -51,7 +51,8 @@ class AssetAccounts implements MapperInterface
}
$list[$accountId] = $name;
}
$list = array_merge([0 => trans('import.map_do_not_map')], $list);
asort($list);
$list = [0 => trans('import.map_do_not_map')] + $list;
return $list;
}

View File

@@ -45,7 +45,8 @@ class Bills implements MapperInterface
$billId = intval($bill->id);
$list[$billId] = $bill->name . ' [' . $bill->match . ']';
}
$list = array_merge([0 => trans('import.map_do_not_map')], $list);
asort($list);
$list = [0 => trans('import.map_do_not_map')] + $list;
return $list;
}

View File

@@ -45,7 +45,8 @@ class Budgets implements MapperInterface
$budgetId = intval($budget->id);
$list[$budgetId] = $budget->name;
}
$list = array_merge([0 => trans('import.map_do_not_map')], $list);
asort($list);
$list = [0 => trans('import.map_do_not_map')] + $list;
return $list;
}

View File

@@ -45,7 +45,8 @@ class Categories implements MapperInterface
$categoryId = intval($category->id);
$list[$categoryId] = $category->name;
}
$list = array_merge([0 => trans('import.map_do_not_map')], $list);
asort($list);
$list = [0 => trans('import.map_do_not_map')] + $list;
return $list;
}

View File

@@ -59,8 +59,9 @@ class OpposingAccountIbans implements MapperInterface
$list[$accountId] = $account->name;
}
}
$list = array_merge($topList, $list);
$list = array_merge([0 => trans('import.map_do_not_map')], $list);
$list = $topList + $list;
asort($list);
$list = [0 => trans('import.map_do_not_map')] + $list;
return $list;
}

View File

@@ -57,7 +57,8 @@ class OpposingAccounts implements MapperInterface
}
$list[$accountId] = $name;
}
$list = ["0" => trans('import.map_do_not_map')] + $list;
asort($list);
$list = [0 => trans('import.map_do_not_map')] + $list;
return $list;
}

View File

@@ -45,7 +45,8 @@ class Tags implements MapperInterface
$tagId = intval($tag->id);
$list[$tagId] = $tag->tag;
}
$list = array_merge([0 => trans('import.map_do_not_map')], $list);
asort($list);
$list = [0 => trans('import.map_do_not_map')] + $list;
return $list;
}

View File

@@ -42,8 +42,9 @@ class TransactionCurrencies implements MapperInterface
$currencyId = intval($currency->id);
$list[$currencyId] = $currency->name . ' (' . $currency->code . ')';
}
asort($list);
$list = array_merge([0 => trans('import.map_do_not_map')], $list);
$list = [0 => trans('import.map_do_not_map')] + $list;
return $list;
}