File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 8
8
use Tempest \KeyValue \Redis \Config \RedisConfig ;
9
9
use Tempest \KeyValue \Redis \PhpRedisClient ;
10
10
use Tempest \KeyValue \Redis \PredisClient ;
11
- use Tempest \KeyValue \Redis \Redis ;
12
11
use Tests \Tempest \Integration \FrameworkIntegrationTestCase ;
13
12
14
13
final class RedisCacheTest extends FrameworkIntegrationTestCase
@@ -37,6 +36,12 @@ public function test_php_redis_cache(): void
37
36
),
38
37
);
39
38
39
+ try {
40
+ $ redis ->connect ();
41
+ } catch (\Throwable ) {
42
+ $ this ->markTestSkipped ('Could not connect to Redis. ' );
43
+ }
44
+
40
45
$ cache = new GenericCache (new RedisAdapter ($ redis ->getClient ()));
41
46
42
47
$ cache ->put ('key ' , 'value ' );
@@ -59,6 +64,12 @@ public function test_predis_cache(): void
59
64
options: ['prefix ' => 'tempest_test: ' ],
60
65
));
61
66
67
+ try {
68
+ $ redis ->connect ();
69
+ } catch (\Throwable ) {
70
+ $ this ->markTestSkipped ('Could not connect to Redis. ' );
71
+ }
72
+
62
73
$ cache = new GenericCache (new RedisAdapter ($ redis ->getClient ()));
63
74
64
75
$ cache ->put ('key ' , 'value ' );
You can’t perform that action at this time.
0 commit comments