forked from GNUsocial/gnu-social
[TESTS] Fix error when testing cold redis cache
This commit is contained in:
parent
c8b2ce6694
commit
120011a2d0
@ -91,11 +91,7 @@ abstract class Common
|
|||||||
|
|
||||||
public static function userNickname(): ?string
|
public static function userNickname(): ?string
|
||||||
{
|
{
|
||||||
if (($user = self::user()) == null) {
|
self::ensureLoggedIn()->getNickname();
|
||||||
throw new NoLoggedInUser();
|
|
||||||
} else {
|
|
||||||
return $user->getNickname();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAllNotes(int $noteScope): array
|
public function getAllNotes(int $noteScope): array
|
||||||
|
@ -33,7 +33,7 @@ class CacheTest extends KernelTestCase
|
|||||||
static::bootKernel();
|
static::bootKernel();
|
||||||
|
|
||||||
// Setup Common::config to have the values in $conf
|
// 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);
|
$cb = $this->createMock(ContainerBagInterface::class);
|
||||||
static::assertTrue($cb instanceof ContainerBagInterface);
|
static::assertTrue($cb instanceof ContainerBagInterface);
|
||||||
$cb->method('get')
|
$cb->method('get')
|
||||||
|
Loading…
Reference in New Issue
Block a user