瀏覽代碼

Added test for ZRANGEBYSCORE with the WITHSCORES parameter.

Daniele Alessandri 15 年之前
父節點
當前提交
5ad2abd149
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      test/RedisCommandsTest.php

+ 5 - 0
test/RedisCommandsTest.php

@@ -1107,6 +1107,11 @@ class RedisCommandTestSuite extends PHPUnit_Framework_TestCase {
             $this->redis->zsetRangeByScore('zset', 30, 0)
         );
 
+        $this->assertEquals(
+            array(array('c', 10), array('d', 20), array('e', 20)), 
+            $this->redis->zsetRangeByScore('zset', 10, 20, 'withscores')
+        );
+
         RC::testForServerException($this, RC::EXCEPTION_WRONG_TYPE, function($test) {
             $test->redis->set('foo', 'bar');
             $test->redis->zsetRangeByScore('foo', 0, 0);