Bläddra i källkod

Fix random stuff.

Daniele Alessandri 14 år sedan
förälder
incheckning
17f83a5605
4 ändrade filer med 9 tillägg och 11 borttagningar
  1. 2 8
      lib/Predis.php
  2. 2 2
      test/ClientFeaturesTest.php
  3. 4 0
      test/PredisShared.php
  4. 1 1
      test/RedisCommandsTest.php

+ 2 - 8
lib/Predis.php

@@ -1930,7 +1930,7 @@ class RedisServer_v2_0 extends RedisServerProfile {
             'type'                      => '\Predis\Commands\Type',
 
             /* commands operating on the key space */
-            'keys'                      => '\Predis\Commands\Keys_v1_2',
+            'keys'                      => '\Predis\Commands\Keys',
             'randomkey'                 => '\Predis\Commands\RandomKey',
             'rename'                    => '\Predis\Commands\Rename',
             'renamenx'                  => '\Predis\Commands\RenamePreserve',
@@ -2012,9 +2012,6 @@ class RedisServer_v2_0 extends RedisServerProfile {
             'append'                    => '\Predis\Commands\Append',
             'substr'                    => '\Predis\Commands\Substr',
 
-            /* commands operating on the key space */
-            'keys'                      => '\Predis\Commands\Keys',
-
             /* commands operating on lists */
             'blpop'                     => '\Predis\Commands\ListPopFirstBlocking',
             'brpop'                     => '\Predis\Commands\ListPopLastBlocking',
@@ -2085,7 +2082,7 @@ class RedisServer_v2_2 extends RedisServerProfile {
             'type'                      => '\Predis\Commands\Type',
 
             /* commands operating on the key space */
-            'keys'                      => '\Predis\Commands\Keys_v1_2',
+            'keys'                      => '\Predis\Commands\Keys',
             'randomkey'                 => '\Predis\Commands\RandomKey',
             'rename'                    => '\Predis\Commands\Rename',
             'renamenx'                  => '\Predis\Commands\RenamePreserve',
@@ -2167,9 +2164,6 @@ class RedisServer_v2_2 extends RedisServerProfile {
             'append'                    => '\Predis\Commands\Append',
             'substr'                    => '\Predis\Commands\Substr',
 
-            /* commands operating on the key space */
-            'keys'                      => '\Predis\Commands\Keys',
-
             /* commands operating on lists */
             'blpop'                     => '\Predis\Commands\ListPopFirstBlocking',
             'brpop'                     => '\Predis\Commands\ListPopLastBlocking',

+ 2 - 2
test/ClientFeaturesTest.php

@@ -1,11 +1,11 @@
 <?php
 
-class PredisClientFeaturesTestSuite extends PHPUnit_Framework_TestCase {
+class ClientFeaturesTestSuite extends PHPUnit_Framework_TestCase {
     public $redis;
 
     protected function setUp() {
         $this->redis = RC::getConnection();
-        $this->redis->flushDatabase();
+        $this->redis->flushdb();
     }
 
     protected function tearDown() {

+ 4 - 0
test/PredisShared.php

@@ -12,6 +12,10 @@ if (I_AM_AWARE_OF_THE_DESTRUCTIVE_POWER_OF_THIS_TEST_SUITE !== true) {
     );
 }
 
+Predis\RedisServerProfile::registerProfile('\Predis\RedisServer_v1_2', '1.2');
+Predis\RedisServerProfile::registerProfile('\Predis\RedisServer_v2_0', '2.0');
+Predis\RedisServerProfile::registerProfile('\Predis\RedisServer_v2_2', '2.2');
+
 if (!function_exists('array_union')) {
     function array_union(Array $a, Array $b) {
         return array_merge($a, array_diff($b, $a));

+ 1 - 1
test/RedisCommandsTest.php

@@ -1,6 +1,6 @@
 <?php
 
-class RedisCommandTestSuite extends PHPUnit_Framework_TestCase {
+class RedisCommandsTestSuite extends PHPUnit_Framework_TestCase {
     public $redis;
 
     // TODO: instead of an boolean assertion against the return value