-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathPredisStoreTest.php
38 lines (33 loc) · 999 Bytes
/
PredisStoreTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Lock\Tests\Store;
/**
* @author Jérémy Derussé <jeremy@derusse.com>
*
* @group integration
*/
class PredisStoreTest extends AbstractRedisStoreTestCase
{
public static function setUpBeforeClass(): void
{
$redis = new \Predis\Client(array_combine(['host', 'port'], explode(':', getenv('REDIS_HOST')) + [1 => null]));
try {
$redis->connect();
} catch (\Exception $e) {
self::markTestSkipped($e->getMessage());
}
}
protected function getRedisConnection(): \Predis\Client
{
$redis = new \Predis\Client(array_combine(['host', 'port'], explode(':', getenv('REDIS_HOST')) + [1 => null]));
$redis->connect();
return $redis;
}
}