Skip to content

Commit 75c8d71

Browse files
committed
ICM: Minor tests fixes.
1 parent 827b7c3 commit 75c8d71

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/Mutex.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,11 @@ public function getStrategy()
5555

5656
private function getRedisLock($client)
5757
{
58-
switch ($client) {
59-
case 'phpredis':
60-
return new PhpRedisLock($this->getPhpRedisClient());
61-
62-
case 'predis':
63-
return new PredisRedisLock($this->getPredisClient());
58+
if ($client === 'phpredis') {
59+
return new PhpRedisLock($this->getPhpRedisClient());
6460
}
61+
62+
return new PredisRedisLock($this->getPredisClient());
6563
}
6664

6765
public function getPhpRedisClient()

tests/ConsoleMutex/MutexTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function it_supports_mysql_strategy()
6666
}
6767

6868
/** @test */
69-
public function it_supports_redis_strategy_with_predis_client()
69+
public function it_supports_redis_strategy_with_predis_client_which_is_default()
7070
{
7171
$this->command->shouldReceive('getMutexStrategy')->withNoArgs()->once()->andReturn('redis');
7272

0 commit comments

Comments
 (0)