Browse Source

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 năm trước cách đây
mục cha
commit
e94fbc3287
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      test/RedisCommandsTest.php

+ 1 - 1
test/RedisCommandsTest.php

@@ -251,7 +251,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));