Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4cd06b2

Browse files
Add a test for passing a single array into sInterStore
1 parent e37c080 commit 4cd06b2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/RedisTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,6 +1407,9 @@ public function testsInterStore() {
14071407
$this->redis->sAdd('{set}t', $i);
14081408
}
14091409

1410+
/* Regression test for passing a single array */
1411+
$this->assertEquals($this->redis->sInterStore(Array('{set}k', '{set}x', '{set}y')), count(array_intersect($x,$y)));
1412+
14101413
$count = $this->redis->sInterStore('{set}k', '{set}x', '{set}y'); // odd prime numbers
14111414
$this->assertEquals($count, $this->redis->scard('{set}k'));
14121415
foreach(array_intersect($x, $y) as $i) {

0 commit comments

Comments
 (0)