public function testPrefix(?string
$aPrefix, ?string
$bPrefix, bool
$equals): void
{ /** @var string $url */
$url = EnvironmentHelper::
getVariable('REDIS_URL'
);
if (!
$url) { static::
markTestSkipped('No redis server configured'
);
} $a =
(new RedisConnectionFactory($aPrefix))->
create($url);
$b =
(new RedisConnectionFactory($bPrefix))->
create($url);
$a->
set('foo', 'bar'
);
$b->
set('foo', 'foo'
);
static::
assertEquals($equals,
$a->
get('foo'
) ===
$b->
get('foo'
));
} public static function prefixProvider(): \Generator
{ yield 'Test different namespace' =>
['namespace-1', 'namespace-2', false
];