Browse Source

Add missing BITPOS command in key prefix processor.

See #265.
Daniele Alessandri 10 years ago
parent
commit
6882d08373

+ 1 - 0
src/Command/Processor/KeyPrefixProcessor.php

@@ -156,6 +156,7 @@ class KeyPrefixProcessor implements ProcessorInterface
             'ZRANGEBYLEX'               => 'self::first',
             'ZREMRANGEBYLEX'            => 'self::first',
             'ZREVRANGEBYLEX'            => 'self::first',
+            'BITPOS'                    => 'self::first',
         );
     }
 

+ 4 - 0
tests/Predis/Command/Processor/KeyPrefixProcessorTest.php

@@ -829,6 +829,10 @@ class KeyPrefixProcessorTest extends PredisTestCase
                 array('key', '+', '-', 'LIMIT', '0', '10'),
                 array('prefix:key', '+', '-', 'LIMIT', '0', '10'),
             ),
+            array('BITPOS',
+                array('key', 0),
+                array('prefix:key', 0),
+            ),
         );
     }
 }