Improve test coverage.

This commit is contained in:
James Cole
2019-08-29 17:53:25 +02:00
parent 91b6b86202
commit 19feefda2d
86 changed files with 3173 additions and 2626 deletions

View File

@@ -99,7 +99,7 @@ class Preferences
public function get(string $name, $default = null): ?Preference
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should NOT be called in the TEST environment!', __METHOD__));
Log::warning(sprintf('%s("%s") should NOT be called in the TEST environment!', __METHOD__, $name));
}
/** @var User $user */
$user = auth()->user();
@@ -149,7 +149,7 @@ class Preferences
public function getForUser(User $user, string $name, $default = null): ?Preference
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should NOT be called in the TEST environment!', __METHOD__));
Log::warning(sprintf('%s("%s") should NOT be called in the TEST environment!', __METHOD__, $name));
}
$fullName = sprintf('preference%s%s', $user->id, $name);
if (Cache::has($fullName)) {