File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 1111use Illuminate \Cache \Events \RetrievingKey ;
1212use Illuminate \Cache \Events \RetrievingManyKeys ;
1313use Illuminate \Cache \Events \WritingKey ;
14+ use Illuminate \Cache \MemoizedStore ;
1415use Illuminate \Contracts \Cache \Store ;
1516use Illuminate \Foundation \Testing \Concerns \InteractsWithRedis ;
17+ use Illuminate \Redis \Connections \PhpRedisClusterConnection ;
18+ use Illuminate \Redis \Connections \PredisClusterConnection ;
1619use Illuminate \Support \Facades \Cache ;
1720use Illuminate \Support \Facades \Config ;
1821use Illuminate \Support \Facades \Event ;
@@ -31,6 +34,12 @@ protected function setUp(): void
3134
3235 $ this ->setUpRedis ();
3336
37+ $ connection = $ this ->app ['redis ' ]->connection ();
38+ $ this ->markTestSkippedWhen (
39+ $ connection instanceof PhpRedisClusterConnection || $ connection instanceof PredisClusterConnection,
40+ 'MemoizedStore currently does not support Redis Cluster connections ' ,
41+ );
42+
3443 Config::set ('cache.default ' , 'redis ' );
3544 Redis::flushAll ();
3645 }
Original file line number Diff line number Diff line change 33namespace Illuminate \Tests \Integration \Cache ;
44
55use Illuminate \Foundation \Testing \Concerns \InteractsWithRedis ;
6+ use Illuminate \Redis \Connections \PhpRedisClusterConnection ;
7+ use Illuminate \Redis \Connections \PhpRedisConnection ;
68use Illuminate \Support \Facades \Cache ;
79use Orchestra \Testbench \TestCase ;
810use PHPUnit \Framework \Attributes \RequiresPhpExtension ;
@@ -17,6 +19,12 @@ protected function setUp(): void
1719 parent ::setUp ();
1820
1921 $ this ->setUpRedis ();
22+
23+ $ connection = $ this ->app ['redis ' ]->connection ();
24+ $ this ->markTestSkippedUnless (
25+ $ connection instanceof PhpRedisConnection || $ connection instanceof PhpRedisClusterConnection,
26+ 'This test is for phpredis only ' ,
27+ );
2028 }
2129
2230 protected function tearDown (): void
@@ -210,7 +218,6 @@ public function testRedisLockCanBeAcquiredAndReleasedWithLz4Compression()
210218 $ this ->markTestSkipped ('Redis extension is not configured to support the lz4 compression. ' );
211219 }
212220
213- $ this ->app ['config ' ]->set ('database.redis.client ' , 'phpredis ' );
214221 $ this ->app ['config ' ]->set ('cache.stores.redis.connection ' , 'default ' );
215222 $ this ->app ['config ' ]->set ('cache.stores.redis.lock_connection ' , 'default ' );
216223
Original file line number Diff line number Diff line change 66use Illuminate \Cache \RedisStore ;
77use Illuminate \Foundation \Testing \Concerns \InteractsWithRedis ;
88use Illuminate \Redis \Connections \PhpRedisClusterConnection ;
9+ use Illuminate \Redis \Connections \PredisClusterConnection ;
910use Illuminate \Support \Facades \Cache ;
1011use Illuminate \Support \Facades \Redis ;
1112use Illuminate \Support \Sleep ;
@@ -22,6 +23,12 @@ protected function setUp(): void
2223 {
2324 $ this ->afterApplicationCreated (function () {
2425 $ this ->setUpRedis ();
26+
27+ $ connection = $ this ->app ['redis ' ]->connection ();
28+ $ this ->markTestSkippedWhen (
29+ $ connection instanceof PhpRedisClusterConnection || $ connection instanceof PredisClusterConnection,
30+ 'RedisStore currently does not support tags, many and on Redis Cluster cluster connections ' ,
31+ );
2532 });
2633
2734 $ this ->beforeApplicationDestroyed (function () {
You can’t perform that action at this time.
0 commit comments