diff options
author | michael-grunder <michael.grunder@gmail.com> | 2020-03-03 09:13:33 +0300 |
---|---|---|
committer | Michael Grunder <michael.grunder@gmail.com> | 2022-09-29 09:18:53 +0300 |
commit | 98fda1b870171a800a587512bcc59c8bdbd0869a (patch) | |
tree | 724e97cb7e1886f1015c3d5ed7a55d5889a9105f /tests | |
parent | a98605f216449479cf27599244c25cbf415ed226 (diff) |
Make sure we set an error for key based scans
See #1661
Diffstat (limited to 'tests')
-rw-r--r-- | tests/RedisClusterTest.php | 1 | ||||
-rw-r--r-- | tests/RedisTest.php | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/RedisClusterTest.php b/tests/RedisClusterTest.php index 6daa93bb..908e1e58 100644 --- a/tests/RedisClusterTest.php +++ b/tests/RedisClusterTest.php @@ -49,6 +49,7 @@ class Redis_Cluster_Test extends Redis_Test { public function testTlsConnect() { return $this->markTestSkipped(); } public function testReset() { return $this->markTestSkipped(); } public function testInvalidAuthArgs() { return $this->markTestSkipped(); } + public function testScanErrors() { return $this->markTestSkipped(); } public function testlMove() { return $this->markTestSkipped(); } public function testlPos() { return $this->marktestSkipped(); } diff --git a/tests/RedisTest.php b/tests/RedisTest.php index 6ef56490..9c06b64e 100644 --- a/tests/RedisTest.php +++ b/tests/RedisTest.php @@ -5701,6 +5701,17 @@ class Redis_Test extends TestSuite $this->assertEquals(0, $i_p_count); } + /* Make sure we capture errors when scanning */ + public function testScanErrors() { + $this->redis->set('scankey', 'simplekey'); + + foreach (['sScan', 'hScan', 'zScan'] as $str_method) { + $it = NULL; + $this->redis->$str_method('scankey', $it); + $this->assertTrue(strpos($this->redis->getLastError(), 'WRONGTYPE') === 0); + } + } + // // HyperLogLog (PF) commands // |