New tests.

This commit is contained in:
James Cole
2015-06-28 18:00:11 +02:00
parent a650fa51f7
commit 70eed5cb5e
7 changed files with 192 additions and 26 deletions

View File

@@ -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;
}

View File

@@ -69,6 +69,7 @@ class ChartJsCategoryChartGenerator implements CategoryChartGenerator
}
/**
* @codeCoverageIgnore
* @param Collection $entries
*
* @return array