Skip to content

Commit 32c1429

Browse files
committed
ICM: Support for Laravel 5.1+ for tests.
1 parent 75c8d71 commit 32c1429

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/ConsoleMutex/MutexTest.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Illuminated\Console\ConsoleMutex\Tests;
44

55
use GenericCommand;
6+
use Illuminate\Redis\Connectors\PhpRedisConnector;
67
use Illuminate\Support\Facades\Cache;
78
use Illuminated\Console\Mutex;
89
use Mockery;
@@ -23,7 +24,7 @@ public function setUp()
2324
parent::setUp();
2425

2526
$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']);
2728
}
2829

2930
/** @test */
@@ -78,6 +79,11 @@ public function it_supports_redis_strategy_with_predis_client_which_is_default()
7879
/** @test */
7980
public function it_supports_redis_strategy_with_phpredis_client()
8081
{
82+
/* @laravel-versions */
83+
if (!class_exists(PhpRedisConnector::class)) {
84+
return;
85+
}
86+
8187
config(['database.redis.client' => 'phpredis']);
8288

8389
$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
97103
/** @test */
98104
public function it_has_get_phpredis_client_method_which_always_returns_an_instance_of_redis_class()
99105
{
106+
/* @laravel-versions */
107+
if (!class_exists(PhpRedisConnector::class)) {
108+
return;
109+
}
110+
100111
config(['database.redis.client' => 'phpredis']);
101112

102113
$mutex = new Mutex($this->command);

0 commit comments

Comments
 (0)