Skip to content

Commit 236ae62

Browse files
committed
Add Robo tasks for multiple client adapters
1 parent 95a97cc commit 236ae62

File tree

2 files changed

+43
-3
lines changed

2 files changed

+43
-3
lines changed

RoboFile.php

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,53 @@ function test()
2020
return $this->taskPhpUnit()->run();
2121
}
2222

23+
function testAll()
24+
{
25+
return (new Collection())
26+
->add($this->taskTestPredis())
27+
->add($this->taskTestPhpRedis())
28+
->add($this->taskTestRedisClient())
29+
->run();
30+
}
31+
32+
function testPredis()
33+
{
34+
return $this->taskTestPredis()->run();
35+
}
36+
37+
function testPhpRedis()
38+
{
39+
return $this->taskTestPhpRedis()->run();
40+
}
41+
42+
function testRedisClient()
43+
{
44+
return $this->taskTestRedisClient()->run();
45+
}
46+
2347
function taskFixCodeStyle()
2448
{
2549
return $this->taskExec('./vendor/bin/php-cs-fixer fix src');
2650
}
2751

28-
function fixCodeStyle()
52+
function taskTestPredis()
53+
{
54+
$task = $this->taskPhpUnit();
55+
$task->env('REDIS_LIBRARY', 'Predis');
56+
return $task;
57+
}
58+
59+
function taskTestPhpRedis()
60+
{
61+
$task = $this->taskPhpUnit();
62+
$task->env('REDIS_LIBRARY', 'PhpRedis');
63+
return $task;
64+
}
65+
66+
function taskTestRedisClient()
2967
{
30-
return $this->taskFixCodeStyle()->run();
68+
$task = $this->taskPhpUnit();
69+
$task->env('REDIS_LIBRARY', 'RedisClient');
70+
return $task;
3171
}
3272
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"mockery/mockery": "^0.9.9",
3131
"predis/predis": "^1.1",
3232
"friendsofphp/php-cs-fixer": "^2.2",
33-
"consolidation/robo": "^1.0",
33+
"consolidation/robo": "^2.0",
3434
"monolog/monolog": "^1.23",
3535
"cheprasov/php-redis-client": "^1.8",
3636
"ukko/phpredis-phpdoc": "^5.0@beta"

0 commit comments

Comments
 (0)