Clean up tests, test only the important things.

This commit is contained in:
James Cole
2019-04-12 04:53:18 +02:00
parent 6f063a134f
commit 5ac39dbdef
65 changed files with 464 additions and 4016 deletions

View File

@@ -215,11 +215,17 @@ class Request extends FormRequest
* @param string $field
*
* @return Carbon|null
* @throws Exception
*/
protected function date(string $field): ?Carbon
{
return $this->get($field) ? new Carbon($this->get($field)) : null;
$result = null;
try {
$result = $this->get($field) ? new Carbon($this->get($field)) : null;
} catch (Exception $e) {
Log::debug(sprintf('Exception when parsing date. Not interesting: %s', $e->getMessage()));
}
return $result;
}
/**