Fix tests

This commit is contained in:
James Cole
2018-04-27 11:29:09 +02:00
parent 28bcff99f6
commit bb25132865
20 changed files with 81 additions and 118 deletions

View File

@@ -36,21 +36,23 @@ declare(strict_types=1);
bcscale(12);
/**
* @param string $key
* @param null $default
*
* @return mixed|null
*/
function envNonEmpty(string $key, $default = null)
{
$result = env($key, $default);
if (is_string($result) && $result === '') {
$result = $default;
}
return $result;
}
if (!function_exists('envNonEmpty')) {
/**
* @param string $key
* @param null $default
*
* @return mixed|null
*/
function envNonEmpty(string $key, $default = null)
{
$result = env($key, $default);
if (is_string($result) && $result === '') {
$result = $default;
}
return $result;
}
}
$app = new Illuminate\Foundation\Application(
realpath(__DIR__ . '/../')