mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Improve test coverage.
This commit is contained in:
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user