Browse Source

Fixed failing tests due to changes introduced in Redis commits 3ea27d3, cc3b01c and 653c924.

Daniele Alessandri 15 years ago
parent
commit
de1b8f45bc
2 changed files with 5 additions and 5 deletions
  1. 2 2
      lib/Predis.php
  2. 3 3
      test/RedisCommandsTest.php

+ 2 - 2
lib/Predis.php

@@ -1739,11 +1739,11 @@ class ZSetRemoveRangeByScore extends \Predis\InlineCommand {
     public function getCommandId() { return 'ZREMRANGEBYSCORE'; }
 }
 
-class ZSetRank extends \Predis\InlineCommand {
+class ZSetRank extends \Predis\BulkCommand {
     public function getCommandId() { return 'ZRANK'; }
 }
 
-class ZSetReverseRank extends \Predis\InlineCommand {
+class ZSetReverseRank extends \Predis\BulkCommand {
     public function getCommandId() { return 'ZREVRANK'; }
 }
 

+ 3 - 3
test/RedisCommandsTest.php

@@ -580,7 +580,7 @@ class RedisCommandTestSuite extends PHPUnit_Framework_TestCase {
         $this->assertEquals(0, $this->redis->listPopLastPushHead('numbers', 'temporary'));
         $this->assertEquals(0, $this->redis->listLength('numbers'));
         $this->assertEquals(3, $this->redis->listLength('temporary'));
-        $this->assertEquals(array(), $this->redis->listRange('numbers', 0, -1));
+        $this->assertNull($this->redis->listRange('numbers', 0, -1));
         $this->assertEquals($numbers, $this->redis->listRange('temporary', 0, -1));
 
         $numbers = RC::pushTailAndReturn($this->redis, 'numbers', array(0, 1, 2));
@@ -874,7 +874,7 @@ class RedisCommandTestSuite extends PHPUnit_Framework_TestCase {
         // non-existing keys are considered empty sets
         $this->redis->delete('setC');
         $this->assertEquals(0, $this->redis->setUnionStore('setC', 'setDoesNotExist'));
-        $this->assertTrue($this->redis->exists('setC'));
+        $this->assertFalse($this->redis->exists('setC'));
         $this->assertEquals(0, $this->redis->setCardinality('setC'));
 
         // existing keys are replaced by SUNIONSTORE
@@ -937,7 +937,7 @@ class RedisCommandTestSuite extends PHPUnit_Framework_TestCase {
         // non-existing keys are considered empty sets
         $this->redis->delete('setC');
         $this->assertEquals(0, $this->redis->setDifferenceStore('setC', 'setDoesNotExist'));
-        $this->assertTrue($this->redis->exists('setC'));
+        $this->assertFalse($this->redis->exists('setC'));
         $this->assertEquals(0, $this->redis->setCardinality('setC'));
 
         // existing keys are replaced by SDIFFSTORE