Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 426de2b

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

File tree

1 file changed

+16
-0
lines changed
Filter options

1 file changed

+16
-0
lines changed

‎tests/RedisTest.php

Copy file name to clipboardExpand all lines: tests/RedisTest.php
+16Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.