Update some tests.

This commit is contained in:
James Cole
2020-01-05 19:29:28 +01:00
parent 465947dddf
commit 39d61feede
26 changed files with 211 additions and 140 deletions

View File

@@ -251,7 +251,7 @@ class BudgetController extends Controller
foreach ($result as $combinedId => $info) {
$parts = explode('-', $combinedId);
$assetId = (int)$parts[0];
$title = sprintf('%s (%s)', $names[$assetId], $info['currency_name']);
$title = sprintf('%s (%s)', $names[$assetId] ?? '(empty)', $info['currency_name']);
$chartData[$title]
= [
'amount' => $info['amount'],
@@ -315,7 +315,7 @@ class BudgetController extends Controller
foreach ($result as $combinedId => $info) {
$parts = explode('-', $combinedId);
$categoryId = (int)$parts[0];
$title = sprintf('%s (%s)', $names[$categoryId], $info['currency_name']);
$title = sprintf('%s (%s)', $names[$categoryId] ?? '(empty)', $info['currency_name']);
$chartData[$title] = [
'amount' => $info['amount'],
'currency_symbol' => $info['currency_symbol'],