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 3
3
namespace Illuminated \Console \ConsoleMutex \Tests ;
4
4
5
5
use GenericCommand ;
6
+ use Illuminate \Redis \Connectors \PhpRedisConnector ;
6
7
use Illuminate \Support \Facades \Cache ;
7
8
use Illuminated \Console \Mutex ;
8
9
use Mockery ;
@@ -23,7 +24,7 @@ public function setUp()
23
24
parent ::setUp ();
24
25
25
26
$ 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 ' ]);
27
28
}
28
29
29
30
/** @test */
@@ -78,6 +79,11 @@ public function it_supports_redis_strategy_with_predis_client_which_is_default()
78
79
/** @test */
79
80
public function it_supports_redis_strategy_with_phpredis_client ()
80
81
{
82
+ /* @laravel-versions */
83
+ if (!class_exists (PhpRedisConnector::class)) {
84
+ return ;
85
+ }
86
+
81
87
config (['database.redis.client ' => 'phpredis ' ]);
82
88
83
89
$ 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
97
103
/** @test */
98
104
public function it_has_get_phpredis_client_method_which_always_returns_an_instance_of_redis_class ()
99
105
{
106
+ /* @laravel-versions */
107
+ if (!class_exists (PhpRedisConnector::class)) {
108
+ return ;
109
+ }
110
+
100
111
config (['database.redis.client ' => 'phpredis ' ]);
101
112
102
113
$ mutex = new Mutex ($ this ->command );
You can’t perform that action at this time.
0 commit comments