mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
New tests.
This commit is contained in:
@@ -45,6 +45,7 @@ class ChartJsBudgetChartGenerator implements BudgetChartGenerator
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Collection $entries
|
||||
*
|
||||
* @return array
|
||||
@@ -62,7 +63,7 @@ class ChartJsBudgetChartGenerator implements BudgetChartGenerator
|
||||
public function frontpage(Collection $entries)
|
||||
{
|
||||
$data = [
|
||||
'count' => 2,
|
||||
'count' => 0,
|
||||
'labels' => [],
|
||||
'datasets' => [],
|
||||
];
|
||||
@@ -119,7 +120,6 @@ class ChartJsBudgetChartGenerator implements BudgetChartGenerator
|
||||
|
||||
foreach ($budgets as $budget) {
|
||||
$data['labels'][] = $budget->name;
|
||||
$data['count']++;
|
||||
}
|
||||
/** @var array $entry */
|
||||
foreach ($entries as $entry) {
|
||||
@@ -132,6 +132,7 @@ class ChartJsBudgetChartGenerator implements BudgetChartGenerator
|
||||
$data['datasets'][] = $array;
|
||||
|
||||
}
|
||||
$data['count'] = count($data['datasets']);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
@@ -69,6 +69,7 @@ class ChartJsCategoryChartGenerator implements CategoryChartGenerator
|
||||
}
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* @param Collection $entries
|
||||
*
|
||||
* @return array
|
||||
|
Reference in New Issue
Block a user