Browse Source

Test suite: add a test for the LIMIT modifier of ZRANGEBYSCORE configured via associative array.

Daniele Alessandri 15 years ago
parent
commit
1520e2c48b
1 changed files with 7 additions and 0 deletions
  1. 7 0
      test/RedisCommandsTest.php

+ 7 - 0
test/RedisCommandsTest.php

@@ -1203,6 +1203,13 @@ class RedisCommandTestSuite extends PHPUnit_Framework_TestCase {
             $this->redis->zrangebyscore('zset', 10, 20, array('limit' => array(1, 2)))
         );
 
+        $this->assertEquals(
+            array('d', 'e'), 
+            $this->redis->zrangebyscore('zset', 10, 20, array(
+                'limit' => array('offset' => 1, 'count' => 2)
+            ))
+        );
+
         $this->assertEquals(
             array(array('d', 20), array('e', 20)), 
             $this->redis->zrangebyscore('zset', 10, 20, array(