|
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;
|
10 | 9 | use NinjaMutex\Lock\FlockLock;
|
11 | 10 | use NinjaMutex\Lock\MemcachedLock;
|
12 | 11 | use NinjaMutex\Lock\MySqlLock;
|
13 |
| -use NinjaMutex\Lock\PhpRedisLock; |
14 | 12 | use NinjaMutex\Lock\PredisRedisLock;
|
15 | 13 | use Predis\Client as PredisClient;
|
16 |
| -use Redis; |
17 | 14 |
|
18 | 15 | class MutexTest extends TestCase
|
19 | 16 | {
|
@@ -76,44 +73,13 @@ public function it_supports_redis_strategy_with_predis_client_which_is_default()
|
76 | 73 | $this->assertEquals($expectedStrategy, $mutex->getStrategy());
|
77 | 74 | }
|
78 | 75 |
|
79 |
| - /** @test */ |
80 |
| - public function it_supports_redis_strategy_with_phpredis_client() |
81 |
| - { |
82 |
| - /* @laravel-versions */ |
83 |
| - if (!class_exists(PhpRedisConnector::class)) { |
84 |
| - return; |
85 |
| - } |
86 |
| - |
87 |
| - config(['database.redis.client' => 'phpredis']); |
88 |
| - |
89 |
| - $this->command->shouldReceive('getMutexStrategy')->withNoArgs()->once()->andReturn('redis'); |
90 |
| - |
91 |
| - $mutex = new Mutex($this->command); |
92 |
| - $expectedStrategy = new PhpRedisLock($mutex->getPhpRedisClient()); |
93 |
| - $this->assertEquals($expectedStrategy, $mutex->getStrategy()); |
94 |
| - } |
95 |
| - |
96 | 76 | /** @test */
|
97 | 77 | public function it_has_get_predis_client_method_which_always_returns_an_instance_of_predis_client_class()
|
98 | 78 | {
|
99 | 79 | $mutex = new Mutex($this->command);
|
100 | 80 | $this->assertInstanceOf(PredisClient::class, $mutex->getPredisClient());
|
101 | 81 | }
|
102 | 82 |
|
103 |
| - /** @test */ |
104 |
| - public function it_has_get_phpredis_client_method_which_always_returns_an_instance_of_redis_class() |
105 |
| - { |
106 |
| - /* @laravel-versions */ |
107 |
| - if (!class_exists(PhpRedisConnector::class)) { |
108 |
| - return; |
109 |
| - } |
110 |
| - |
111 |
| - config(['database.redis.client' => 'phpredis']); |
112 |
| - |
113 |
| - $mutex = new Mutex($this->command); |
114 |
| - $this->assertInstanceOf(Redis::class, $mutex->getPhpRedisClient()); |
115 |
| - } |
116 |
| - |
117 | 83 | /** @test */
|
118 | 84 | public function it_supports_memcached_strategy()
|
119 | 85 | {
|
|
0 commit comments