浏览代码

Adjust the tests for SUBSTR/GETRANGE since the return value for empty string slices has been fixed in Redis 2.2.2.

Daniele Alessandri 14 年之前
父节点
当前提交
c03ab9480e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      test/RedisCommandsTest.php

+ 1 - 1
test/RedisCommandsTest.php

@@ -252,7 +252,7 @@ class RedisCommandTestSuite extends PHPUnit_Framework_TestCase {
         $this->assertEquals('bar', $this->redis->substr('var', 3, 5));
         $this->assertEquals('bar', $this->redis->substr('var', -3, -1));
 
-        $this->assertNull($this->redis->substr('var', 5, 0));
+        $this->assertEquals($this->redis->substr('var', 5, 0), '');
 
         $this->redis->set('numeric', 123456789);
         $this->assertEquals(12345, $this->redis->substr('numeric', 0, 4));