Improve test coverage.

This commit is contained in:
James Cole
2019-07-24 19:02:41 +02:00
parent 226e2f7185
commit ee95606ec0
39 changed files with 378 additions and 234 deletions

View File

@@ -30,23 +30,6 @@ namespace FireflyIII\Support\Http\Controllers;
trait BasicDataSupport
{
/**
* Sum up an array.
*
* @param array $array
*
* @return string
*/
protected function arraySum(array $array): string // filter + group data
{
$sum = '0';
foreach ($array as $entry) {
$sum = bcadd($sum, $entry);
}
return $sum;
}
/**
* Filters empty results from getBudgetPeriodReport.
*

View File

@@ -236,6 +236,7 @@ trait ChartGeneration
$chartData[1]['entries'][$label] = round($earned, 12);
$chartData[2]['entries'][$label] = round($sum, 12);
// @codeCoverageIgnoreStart
switch ($step) {
default:
case '1D':
@@ -251,6 +252,7 @@ trait ChartGeneration
$start->addYear();
break;
}
// @codeCoverageIgnoreEnd
}
$data = $generator->multiSet($chartData);

View File

@@ -155,8 +155,7 @@ trait UserNavigation
$url = app('url')->previous();
session()->put($identifier, $url);
//Log::debug(sprintf('Will put previous URI in cache under key %s: %s', $identifier, $url));
return;
//return;
}
//Log::debug(sprintf('The users session contains errors somehow so we will not remember the URI!: %s', var_export($errors, true)));
}