Skip to content

Commit 0f178a0

Browse files
committed
ICM: Tests added.
1 parent 5b6e816 commit 0f178a0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/ConsoleMutex/MutexTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use NinjaMutex\Lock\PhpRedisLock;
1313
use NinjaMutex\Lock\PredisRedisLock;
1414
use Predis\Client as PredisClient;
15+
use Redis;
1516

1617
class MutexTest extends TestCase
1718
{
@@ -93,6 +94,15 @@ public function it_has_get_predis_client_method_which_always_returns_an_instance
9394
$this->assertInstanceOf(PredisClient::class, $mutex->getPredisClient());
9495
}
9596

97+
/** @test */
98+
public function it_has_get_phpredis_client_method_which_always_returns_an_instance_of_redis_class()
99+
{
100+
config(['database.redis.client' => 'phpredis']);
101+
102+
$mutex = new Mutex($this->command);
103+
$this->assertInstanceOf(Redis::class, $mutex->getPhpRedisClient());
104+
}
105+
96106
/** @test */
97107
public function it_supports_memcached_strategy()
98108
{

0 commit comments

Comments
 (0)