From de1b8f45bc8ddbad0a2bf25366bc07d506835a18 Mon Sep 17 00:00:00 2001 From: Daniele Alessandri Date: Mon, 29 Mar 2010 12:17:17 +0200 Subject: [PATCH] Fixed failing tests due to changes introduced in Redis commits 3ea27d3, cc3b01c and 653c924. --- lib/Predis.php | 4 ++-- test/RedisCommandsTest.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Predis.php b/lib/Predis.php index 2f310dc1..4cc2ebcf 100644 --- a/lib/Predis.php +++ b/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'; } } diff --git a/test/RedisCommandsTest.php b/test/RedisCommandsTest.php index ea6634c0..4bc3f467 100644 --- a/test/RedisCommandsTest.php +++ b/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