[TESTS] Fix error when testing cold redis cache

This commit is contained in:
Hugo Sales 2021-04-05 13:45:39 +00:00
parent 88e4044d02
commit b387ea9aa0
Signed by untrusted user: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
2 changed files with 2 additions and 6 deletions

View File

@ -91,11 +91,7 @@ abstract class Common
public static function userNickname(): ?string
{
if (($user = self::user()) == null) {
throw new NoLoggedInUser();
} else {
return $user->getNickname();
}
self::ensureLoggedIn()->getNickname();
}
public function getAllNotes(int $noteScope): array

View File

@ -33,7 +33,7 @@ class CacheTest extends KernelTestCase
static::bootKernel();
// Setup Common::config to have the values in $conf
$conf = ['cache' => ['adapters' => $adapters]];
$conf = ['cache' => ['adapters' => $adapters, 'early_recompute' => INF]];
$cb = $this->createMock(ContainerBagInterface::class);
static::assertTrue($cb instanceof ContainerBagInterface);
$cb->method('get')