8000 Test for empty pipeline and multi · phpredis/phpredis@426de2b · GitHub
[go: up one dir, main page]

Skip to content

Commit 426de2b

Browse files
JakubOnderkamichael-grunder
authored andcommitted
Test for empty pipeline and multi
1 parent 400503b commit 426de2b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/RedisTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3456,6 +3456,22 @@ public function testPipelineMultiExec() {
34563456
$this->assertEquals(5, count($ret)); // should be 5 atomic operations
34573457
}
34583458

3459+
public function testMultiEmpty()
3460+
{
3461+
$ret = $this->redis->multi()->exec();
3462+
$this->assertEquals([], $ret);
3463+
}
3464+
3465+
public function testPipelineEmpty()
3466+
{
3467+
if (!$this->havePipeline()) {
3468+
$this->markTestSkipped();
3469+
}
3470+
3471+
$ret = $this->redis->pipeline()->exec();
3472+
$this->assertEquals([], $ret);
3473+
}
3474+
34593475
/* GitHub issue #1211 (ignore redundant calls to pipeline or multi) */
34603476
public function testDoublePipeNoOp() {
34613477
/* Only the first pipeline should be honored */

0 commit comments

Comments
 (0)
0