File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ class RedisSimpleLockFactoryTest extends TestCase
10
10
11
11
public function setUp (): void
12
12
{
13
- $ this ->redisClient = new \Predis \Client (getenv ('REDIS_URI ' ));
13
+ $ uri = getenv ("REDIS_URI " );
14
+ $ this ->redisClient = is_string ($ uri ) : new \Predis \Client($ uri ): new \Predis \Client ();
14
15
$ this ->redisClient ->flushdb ();
15
16
}
16
17
Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ class RedisSimpleLockTest extends TestCase
9
9
10
10
public function setUp (): void
11
11
{
12
- $ this ->redisClient = new \Predis \Client (getenv ("REDIS_URI " ));
12
+ $ uri = getenv ("REDIS_URI " );
13
+ $ this ->redisClient = is_string ($ uri ) : new \Predis \Client($ uri ): new \Predis \Client ();
13
14
$ this ->redisClient ->flushdb ();
14
15
}
15
16
You can’t perform that action at this time.
0 commit comments