use Symfony\Component\Cache\Exception\InvalidArgumentException;
use Symfony\Component\Cache\Traits\RedisClusterProxy;
/**
* @group integration
*/
class RedisClusterAdapterTest extends AbstractRedisAdapterTestCase
{ public static function setUpBeforeClass(): void
{ if (!
class_exists(\RedisCluster::
class)) { throw new SkippedTestSuiteError('The RedisCluster class is required.'
);
} if (!
$hosts =
getenv('REDIS_CLUSTER_HOSTS'
)) { throw new SkippedTestSuiteError('REDIS_CLUSTER_HOSTS env var is not defined.'
);
} self::
$redis = AbstractAdapter::
createConnection('redis:?host['.
str_replace(' ', ']&host[',
$hosts).']',
['lazy' => true, 'redis_cluster' => true
]);
self::
$redis->
setOption(\Redis::OPT_PREFIX, 'prefix_'
);
} public function createCachePool(int
$defaultLifetime = 0, string
$testMethod = null
): CacheItemPoolInterface
{