Improve test coverage.

This commit is contained in:
James Cole
2018-03-03 17:16:47 +01:00
parent 9dc4c50527
commit 7542175258
28 changed files with 414 additions and 98 deletions

View File

@@ -122,9 +122,12 @@ class ReportFormRequest extends Request
if (2 === count($parts)) {
try {
$date = new Carbon($parts[1]);
// @codeCoverageIgnoreStart
} catch (Exception $e) {
throw new FireflyException(sprintf('"%s" is not a valid date range.', $range));
// @codeCoverageIgnoreEnd
}
}
return $date;
@@ -165,8 +168,10 @@ class ReportFormRequest extends Request
if (2 === count($parts)) {
try {
$date = new Carbon($parts[0]);
// @codeCoverageIgnoreStart
} catch (Exception $e) {
throw new FireflyException(sprintf('"%s" is not a valid date range.', $range));
// @codeCoverageIgnoreEnd
}
}