File tree 2 files changed +1
-18
lines changed
2 files changed +1
-18
lines changed Original file line number Diff line number Diff line change 11
11
use NinjaMutex \Lock \PhpRedisLock ;
12
12
use NinjaMutex \Lock \PredisRedisLock ;
13
13
use NinjaMutex \Mutex as Ninja ;
14
- use Predis \Client as PredisClient ;
15
14
16
15
class Mutex
17
16
{
@@ -69,12 +68,7 @@ public function getPhpRedisClient()
69
68
70
69
public function getPredisClient ()
71
70
{
72
- $ connection = RedisFacade::connection ();
73
-
74
- /* @laravel-versions */
75
- $ predisClient = ($ connection instanceof PredisClient) ? $ connection : $ connection ->client ();
76
-
77
- return $ predisClient ;
71
+ return RedisFacade::connection ()->client ();
78
72
}
79
73
80
74
public function __call ($ method , $ parameters )
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 ;
7
6
use Illuminate \Support \Facades \Cache ;
8
7
use Illuminated \Console \Mutex ;
9
8
use Mockery ;
@@ -79,11 +78,6 @@ public function it_supports_redis_strategy_with_predis_client_which_is_default()
79
78
/** @test */
80
79
public function it_supports_redis_strategy_with_phpredis_client ()
81
80
{
82
- /* @laravel-versions */
83
- if (!class_exists (PhpRedisConnector::class)) {
84
- return ;
85
- }
86
-
87
81
config (['database.redis.client ' => 'phpredis ' ]);
88
82
89
83
$ this ->command ->shouldReceive ('getMutexStrategy ' )->withNoArgs ()->once ()->andReturn ('redis ' );
@@ -103,11 +97,6 @@ public function it_has_get_predis_client_method_which_always_returns_an_instance
103
97
/** @test */
104
98
public function it_has_get_phpredis_client_method_which_always_returns_an_instance_of_redis_class ()
105
99
{
106
- /* @laravel-versions */
107
- if (!class_exists (PhpRedisConnector::class)) {
108
- return ;
109
- }
110
-
111
100
config (['database.redis.client ' => 'phpredis ' ]);
112
101
113
102
$ mutex = new Mutex ($ this ->command );
You can’t perform that action at this time.
0 commit comments