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 33namespace Illuminated \Console \ConsoleMutex \Tests ;
44
55use GenericCommand ;
6+ use Illuminate \Redis \Connectors \PhpRedisConnector ;
67use Illuminate \Support \Facades \Cache ;
78use Illuminated \Console \Mutex ;
89use Mockery ;
@@ -23,7 +24,7 @@ public function setUp()
2324 parent ::setUp ();
2425
2526 $ this ->command = Mockery::mock (GenericCommand::class)->makePartial ();
26- $ this ->command ->shouldReceive ('argument ' )->withNoArgs ()->once ()-> andReturn (['foo ' => 'bar ' ]);
27+ $ this ->command ->shouldReceive ('argument ' )->withNoArgs ()->andReturn (['foo ' => 'bar ' ]);
2728 }
2829
2930 /** @test */
@@ -78,6 +79,11 @@ public function it_supports_redis_strategy_with_predis_client_which_is_default()
7879 /** @test */
7980 public function it_supports_redis_strategy_with_phpredis_client ()
8081 {
82+ /* @laravel-versions */
83+ if (!class_exists (PhpRedisConnector::class)) {
84+ return ;
85+ }
86+
8187 config (['database.redis.client ' => 'phpredis ' ]);
8288
8389 $ this ->command ->shouldReceive ('getMutexStrategy ' )->withNoArgs ()->once ()->andReturn ('redis ' );
@@ -97,6 +103,11 @@ public function it_has_get_predis_client_method_which_always_returns_an_instance
97103 /** @test */
98104 public function it_has_get_phpredis_client_method_which_always_returns_an_instance_of_redis_class ()
99105 {
106+ /* @laravel-versions */
107+ if (!class_exists (PhpRedisConnector::class)) {
108+ return ;
109+ }
110+
100111 config (['database.redis.client ' => 'phpredis ' ]);
101112
102113 $ mutex = new Mutex ($ this ->command );
You can’t perform that action at this time.
0 commit comments