소스 검색

Move command "COMMAND" to the server profile for Redis 2.8.

This command has been backported from the "unstable" branch of Redis
to the "2.8" one, and it is available since 2.8.13.
Daniele Alessandri 11 년 전
부모
커밋
dedc1ba0a9
4개의 변경된 파일10개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 0
      src/Profile/RedisVersion280.php
  2. 3 2
      src/Profile/RedisVersion300.php
  3. 3 0
      tests/Predis/Command/ServerCommandTest.php
  4. 1 0
      tests/Predis/Profile/RedisVersion280Test.php

+ 3 - 0
src/Profile/RedisVersion280.php

@@ -254,6 +254,9 @@ class RedisVersion280 extends RedisProfile
             'PFADD'                     => 'Predis\Command\HyperLogLogAdd',
             'PFCOUNT'                   => 'Predis\Command\HyperLogLogCount',
             'PFMERGE'                   => 'Predis\Command\HyperLogLogMerge',
+
+            /* remote server control commands */
+            'COMMAND'                   => 'Predis\Command\ServerCommand',
         );
     }
 }

+ 3 - 2
src/Profile/RedisVersion300.php

@@ -255,10 +255,11 @@ class RedisVersion300 extends RedisProfile
             'PFCOUNT'                   => 'Predis\Command\HyperLogLogCount',
             'PFMERGE'                   => 'Predis\Command\HyperLogLogMerge',
 
-            /* ---------------- Redis 3.0 ---------------- */
-
             /* remote server control commands */
             'COMMAND'                   => 'Predis\Command\ServerCommand',
+
+            /* ---------------- Redis 3.0 ---------------- */
+
         );
     }
 }

+ 3 - 0
tests/Predis/Command/ServerCommandTest.php

@@ -84,6 +84,7 @@ class ServerCommandTest extends PredisCommandTestCase
 
     /**
      * @group connected
+     * @requiresRedisVersion >= 2.8.13
      */
     public function testReturnsEmptyCommandInfoOnNonExistingCommand()
     {
@@ -95,6 +96,7 @@ class ServerCommandTest extends PredisCommandTestCase
 
     /**
      * @group connected
+     * @requiresRedisVersion >= 2.8.13
      */
     public function testReturnsCommandInfoOnExistingCommand()
     {
@@ -112,6 +114,7 @@ class ServerCommandTest extends PredisCommandTestCase
 
     /**
      * @group connected
+     * @requiresRedisVersion >= 2.8.13
      */
     public function testReturnsListOfCommandInfoWithNoArguments()
     {

+ 1 - 0
tests/Predis/Profile/RedisVersion280Test.php

@@ -185,6 +185,7 @@ class RedisVersion280Test extends PredisProfileTestCase
             144 => 'PFADD',
             145 => 'PFCOUNT',
             146 => 'PFMERGE',
+            147 => 'COMMAND',
         );
     }
 }