mirror of
https://github.com/predis/predis.git
synced 2026-08-30 12:15:03 +00:00
Added a test for SUBSTR on integer-encoded values.
This commit is contained in:
@@ -210,8 +210,12 @@ class RedisCommandTestSuite extends PHPUnit_Framework_TestCase {
|
||||
$this->assertEquals('foo', $this->redis->substr('var', 0, 2));
|
||||
$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->redis->set('numeric', 123456789);
|
||||
$this->assertEquals(12345, $this->redis->substr('numeric', 0, 4));
|
||||
|
||||
RC::testForServerException($this, RC::EXCEPTION_WRONG_TYPE, function($test) {
|
||||
$test->redis->pushTail('metavars', 'foo');
|
||||
$test->redis->substr('metavars', 0, 3);
|
||||
|
||||
Reference in New Issue
Block a user