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 88use Tempest \KeyValue \Redis \Config \RedisConfig ;
99use Tempest \KeyValue \Redis \PhpRedisClient ;
1010use Tempest \KeyValue \Redis \PredisClient ;
11- use Tempest \KeyValue \Redis \Redis ;
1211use Tests \Tempest \Integration \FrameworkIntegrationTestCase ;
1312
1413final class RedisCacheTest extends FrameworkIntegrationTestCase
@@ -37,6 +36,12 @@ public function test_php_redis_cache(): void
3736 ),
3837 );
3938
39+ try {
40+ $ redis ->connect ();
41+ } catch (\Throwable ) {
42+ $ this ->markTestSkipped ('Could not connect to Redis. ' );
43+ }
44+
4045 $ cache = new GenericCache (new RedisAdapter ($ redis ->getClient ()));
4146
4247 $ cache ->put ('key ' , 'value ' );
@@ -59,6 +64,12 @@ public function test_predis_cache(): void
5964 options: ['prefix ' => 'tempest_test: ' ],
6065 ));
6166
67+ try {
68+ $ redis ->connect ();
69+ } catch (\Throwable ) {
70+ $ this ->markTestSkipped ('Could not connect to Redis. ' );
71+ }
72+
6273 $ cache = new GenericCache (new RedisAdapter ($ redis ->getClient ()));
6374
6475 $ cache ->put ('key ' , 'value ' );
You can’t perform that action at this time.
0 commit comments