|
@@ -240,6 +240,19 @@ class RedisCommandTestSuite extends PHPUnit_Framework_TestCase {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ function testStrlen() {
|
|
|
+ $this->redis->set('var', 'foobar');
|
|
|
+ $this->assertEquals(6, $this->redis->strlen('var'));
|
|
|
+ $this->assertEquals(9, $this->redis->append('var', '___'));
|
|
|
+ $this->assertEquals(9, $this->redis->strlen('var'));
|
|
|
+
|
|
|
+ RC::testForServerException($this, RC::EXCEPTION_WRONG_TYPE, function($test) {
|
|
|
+ $test->redis->rpush('metavars', 'foo');
|
|
|
+ $test->redis->strlen('metavars');
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
function testKeys() {
|