瀏覽代碼

[tests] Improve the basic framework of our test suite.

We now have a base test case class for Predis (namely PredisTestCase)
grouping various commonly used utility methods shared by all of the
tests in the suite, greatly improving reusability.

NOTE: Backported from v0.9-dev.
Daniele Alessandri 11 年之前
父節點
當前提交
a9b42924e5
共有 100 個文件被更改,包括 569 次插入515 次删除
  1. 1 3
      bin/generate-command-test.php
  2. 14 10
      tests/PHPUnit/ArrayHasSameValuesConstraint.php
  3. 0 237
      tests/PHPUnit/CommandTestCase.php
  4. 127 0
      tests/PHPUnit/PredisCommandTestCase.php
  5. 2 28
      tests/PHPUnit/PredisConnectionTestCase.php
  6. 2 2
      tests/PHPUnit/PredisDistributorTestCase.php
  7. 8 5
      tests/PHPUnit/PredisProfileTestCase.php
  8. 233 0
      tests/PHPUnit/PredisTestCase.php
  9. 2 2
      tests/Predis/ClientExceptionTest.php
  10. 2 42
      tests/Predis/ClientTest.php
  11. 2 2
      tests/Predis/Cluster/Distribution/EmptyRingExceptionTest.php
  12. 1 1
      tests/Predis/Cluster/Distribution/HashRingTest.php
  13. 1 1
      tests/Predis/Cluster/Distribution/KetamaPureRingTest.php
  14. 2 3
      tests/Predis/Cluster/PredisClusterHashStrategyTest.php
  15. 2 3
      tests/Predis/Cluster/RedisClusterHashStrategyTest.php
  16. 2 3
      tests/Predis/Collection/Iterator/HashKeyTest.php
  17. 2 3
      tests/Predis/Collection/Iterator/KeyspaceTest.php
  18. 2 3
      tests/Predis/Collection/Iterator/ListKeyTest.php
  19. 2 3
      tests/Predis/Collection/Iterator/SetKeyTest.php
  20. 2 3
      tests/Predis/Collection/Iterator/SortedSetKeyTest.php
  21. 2 2
      tests/Predis/Command/CommandTest.php
  22. 2 2
      tests/Predis/Command/ConnectionAuthTest.php
  23. 2 2
      tests/Predis/Command/ConnectionEchoTest.php
  24. 2 2
      tests/Predis/Command/ConnectionPingTest.php
  25. 2 2
      tests/Predis/Command/ConnectionQuitTest.php
  26. 2 2
      tests/Predis/Command/ConnectionSelectTest.php
  27. 2 2
      tests/Predis/Command/HashDeleteTest.php
  28. 2 2
      tests/Predis/Command/HashExistsTest.php
  29. 2 2
      tests/Predis/Command/HashGetAllTest.php
  30. 2 2
      tests/Predis/Command/HashGetMultipleTest.php
  31. 2 2
      tests/Predis/Command/HashGetTest.php
  32. 2 2
      tests/Predis/Command/HashIncrementByFloatTest.php
  33. 2 2
      tests/Predis/Command/HashIncrementByTest.php
  34. 2 2
      tests/Predis/Command/HashKeysTest.php
  35. 2 2
      tests/Predis/Command/HashLengthTest.php
  36. 2 2
      tests/Predis/Command/HashScanTest.php
  37. 2 2
      tests/Predis/Command/HashSetMultipleTest.php
  38. 2 2
      tests/Predis/Command/HashSetPreserveTest.php
  39. 2 2
      tests/Predis/Command/HashSetTest.php
  40. 2 2
      tests/Predis/Command/HashValuesTest.php
  41. 2 2
      tests/Predis/Command/KeyDeleteTest.php
  42. 2 2
      tests/Predis/Command/KeyDumpTest.php
  43. 2 2
      tests/Predis/Command/KeyExistsTest.php
  44. 2 2
      tests/Predis/Command/KeyExpireAtTest.php
  45. 2 2
      tests/Predis/Command/KeyExpireTest.php
  46. 2 2
      tests/Predis/Command/KeyKeysTest.php
  47. 2 2
      tests/Predis/Command/KeyKeysV12xTest.php
  48. 2 2
      tests/Predis/Command/KeyMoveTest.php
  49. 2 2
      tests/Predis/Command/KeyPersistTest.php
  50. 2 2
      tests/Predis/Command/KeyPreciseExpireAtTest.php
  51. 2 2
      tests/Predis/Command/KeyPreciseExpireTest.php
  52. 2 2
      tests/Predis/Command/KeyPreciseTimeToLiveTest.php
  53. 2 2
      tests/Predis/Command/KeyRandomTest.php
  54. 2 2
      tests/Predis/Command/KeyRenamePreserveTest.php
  55. 2 2
      tests/Predis/Command/KeyRenameTest.php
  56. 2 2
      tests/Predis/Command/KeyRestoreTest.php
  57. 2 3
      tests/Predis/Command/KeyScanTest.php
  58. 2 2
      tests/Predis/Command/KeySortTest.php
  59. 2 2
      tests/Predis/Command/KeyTimeToLiveTest.php
  60. 2 2
      tests/Predis/Command/KeyTypeTest.php
  61. 2 2
      tests/Predis/Command/ListIndexTest.php
  62. 2 2
      tests/Predis/Command/ListInsertTest.php
  63. 2 2
      tests/Predis/Command/ListLengthTest.php
  64. 2 2
      tests/Predis/Command/ListPopFirstBlockingTest.php
  65. 2 2
      tests/Predis/Command/ListPopFirstTest.php
  66. 2 2
      tests/Predis/Command/ListPopLastBlockingTest.php
  67. 2 2
      tests/Predis/Command/ListPopLastPushHeadBlockingTest.php
  68. 2 2
      tests/Predis/Command/ListPopLastPushHeadTest.php
  69. 2 2
      tests/Predis/Command/ListPopLastTest.php
  70. 2 2
      tests/Predis/Command/ListPushHeadTest.php
  71. 2 2
      tests/Predis/Command/ListPushHeadXTest.php
  72. 2 2
      tests/Predis/Command/ListPushTailTest.php
  73. 2 2
      tests/Predis/Command/ListPushTailXTest.php
  74. 2 2
      tests/Predis/Command/ListRangeTest.php
  75. 2 2
      tests/Predis/Command/ListRemoveTest.php
  76. 2 2
      tests/Predis/Command/ListSetTest.php
  77. 2 2
      tests/Predis/Command/ListTrimTest.php
  78. 2 2
      tests/Predis/Command/PrefixHelpersTest.php
  79. 2 2
      tests/Predis/Command/PrefixableCommandTest.php
  80. 2 2
      tests/Predis/Command/Processor/KeyPrefixProcessorTest.php
  81. 2 2
      tests/Predis/Command/Processor/ProcessorChainTest.php
  82. 2 2
      tests/Predis/Command/PubSubPublishTest.php
  83. 2 2
      tests/Predis/Command/PubSubSubscribeByPatternTest.php
  84. 2 2
      tests/Predis/Command/PubSubSubscribeTest.php
  85. 2 2
      tests/Predis/Command/PubSubUnsubscribeByPatternTest.php
  86. 2 2
      tests/Predis/Command/PubSubUnsubscribeTest.php
  87. 2 2
      tests/Predis/Command/RawCommandTest.php
  88. 2 2
      tests/Predis/Command/ScriptedCommandTest.php
  89. 2 2
      tests/Predis/Command/ServerBackgroundRewriteAOFTest.php
  90. 2 2
      tests/Predis/Command/ServerBackgroundSaveTest.php
  91. 2 2
      tests/Predis/Command/ServerClientTest.php
  92. 2 2
      tests/Predis/Command/ServerConfigTest.php
  93. 2 2
      tests/Predis/Command/ServerDatabaseSizeTest.php
  94. 2 2
      tests/Predis/Command/ServerEvalSHATest.php
  95. 2 2
      tests/Predis/Command/ServerEvalTest.php
  96. 2 2
      tests/Predis/Command/ServerFlushAllTest.php
  97. 2 2
      tests/Predis/Command/ServerFlushDatabaseTest.php
  98. 2 2
      tests/Predis/Command/ServerInfoTest.php
  99. 2 2
      tests/Predis/Command/ServerInfoV26xTest.php
  100. 2 2
      tests/Predis/Command/ServerLastSaveTest.php

+ 1 - 3
bin/generate-command-test.php

@@ -171,13 +171,11 @@ class CommandTestCaseGenerator
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
-
 /**
  * @group commands
  * @group realm-$realm
  */
-class $class extends CommandTestCase
+class $class extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 14 - 10
tests/PHPUnit/ArrayHasSameValuesConstraint.php

@@ -9,9 +9,6 @@
  * file that was distributed with this source code.
  */
 
-use \PHPUnit_Framework_Constraint;
-use \PHPUnit_Framework_ExpectationFailedException;
-
 /**
  * Constraint that accepts arrays with the same elements but different order.
  */
@@ -30,15 +27,14 @@ class ArrayHasSameValuesConstraint extends PHPUnit_Framework_Constraint
     /**
      * {@inheritdoc}
      */
-    public function evaluate($other, $description = '', $returnResult = FALSE)
+    public function matches($other)
     {
-        $description = $description ?: 'Failed asserting that two arrays have the same elements.';
-
         if (count($this->array) !== count($other)) {
-            throw new PHPUnit_Framework_ExpectationFailedException($description);
+            return false;
         }
+
         if (array_diff($this->array, $other)) {
-            throw new PHPUnit_Framework_ExpectationFailedException($description);
+            return false;
         }
 
         return true;
@@ -49,6 +45,14 @@ class ArrayHasSameValuesConstraint extends PHPUnit_Framework_Constraint
      */
     public function toString()
     {
-        return 'two arrays have the same elements.';
+        return 'two arrays contain the same elements.';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function failureDescription($other)
+    {
+        return $this->toString();
     }
-}
+}

+ 0 - 237
tests/PHPUnit/CommandTestCase.php

@@ -1,237 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Predis\Command;
-
-use \PHPUnit_Framework_TestCase as StandardTestCase;
-
-use Predis\Client;
-use Predis\Profile\ServerProfile;
-use Predis\Profile\ServerProfileInterface;
-
-/**
- *
- */
-abstract class CommandTestCase extends StandardTestCase
-{
-    /**
-     * Returns the expected command.
-     *
-     * @return CommandInterface|string Instance or FQN of the expected command.
-     */
-    protected abstract function getExpectedCommand();
-
-    /**
-     * Returns the expected command ID.
-     *
-     * @return string
-     */
-    protected abstract function getExpectedId();
-
-    /**
-     * Returns a new command instance.
-     *
-     * @return CommandInterface
-     */
-    public function getCommand()
-    {
-        $command = $this->getExpectedCommand();
-
-        return $command instanceof CommandInterface ? $command : new $command();
-    }
-
-    /**
-     * Return the server profile used during the tests.
-     *
-     * @return ServerProfileInterface
-     */
-    public function getProfile()
-    {
-        return ServerProfile::get(REDIS_SERVER_VERSION);
-    }
-
-    /**
-     * Returns a new client instance.
-     *
-     * @param Boolean $connect Flush selected database before returning the client.
-     * @return Client
-     */
-    public function getClient($flushdb = true)
-    {
-        $profile = $this->getProfile();
-
-        if (!$profile->supportsCommand($id = $this->getExpectedId())) {
-            $this->markTestSkipped("The profile {$profile->getVersion()} does not support command {$id}");
-        }
-
-        $parameters = array(
-            'host' => REDIS_SERVER_HOST,
-            'port' => REDIS_SERVER_PORT,
-        );
-
-        $options = array(
-            'profile' => $profile
-        );
-
-        $client = new Client($parameters, $options);
-        $client->connect();
-        $client->select(REDIS_SERVER_DBNUM);
-
-        if ($flushdb) {
-            $client->flushdb();
-        }
-
-        return $client;
-    }
-
-    /**
-     * Returns wether the command is prefixable or not.
-     *
-     * @return Boolean
-     */
-    protected function isPrefixable()
-    {
-        return $this->getCommand() instanceof PrefixableCommandInterface;
-    }
-
-    /**
-     * Returns a new command instance with the specified arguments.
-     *
-     * @param ... List of arguments for the command.
-     * @return CommandInterface
-     */
-    protected function getCommandWithArguments(/* arguments */)
-    {
-        return $this->getCommandWithArgumentsArray(func_get_args());
-    }
-
-    /**
-     * Returns a new command instance with the specified arguments.
-     *
-     * @param array $arguments Arguments for the command.
-     * @return CommandInterface
-     */
-    protected function getCommandWithArgumentsArray(Array $arguments)
-    {
-        $command = $this->getCommand();
-        $command->setArguments($arguments);
-
-        return $command;
-    }
-
-    /**
-     * Sleep the test case with microseconds resolution.
-     *
-     * @param float $seconds Seconds to sleep.
-     */
-    protected function sleep($seconds)
-    {
-        usleep($seconds * 1000000);
-    }
-
-    /**
-     * Asserts that two arrays have the same values, even if with different order.
-     *
-     * @param Array $expected Expected array.
-     * @param Array $actual Actual array.
-     */
-    protected function assertSameValues(Array $expected, Array $actual)
-    {
-        $this->assertThat($expected, new \ArrayHasSameValuesConstraint($actual));
-    }
-
-    /**
-     * @group disconnected
-     */
-    public function testCommandId()
-    {
-        $command = $this->getCommand();
-
-        $this->assertInstanceOf('Predis\Command\CommandInterface', $command);
-        $this->assertEquals($this->getExpectedId(), $command->getId());
-    }
-
-    /**
-     * @param  string $expectedVersion Expected redis version
-     * @param  string $operator Comparison operator.
-     * @throws \PHPUnit_Framework_SkippedTestError when expected redis version is not met
-     */
-    protected function executeOnRedisVersion($expectedVersion, $operator, $callback)
-    {
-        $client = $this->getClient();
-        $info = array_change_key_case($client->info());
-
-        if (isset($info['server']['redis_version'])) {
-            // Redis >= 2.6
-            $version = $info['server']['redis_version'];
-        } else if (isset($info['redis_version'])) {
-            // Redis < 2.6
-            $version = $info['redis_version'];
-        } else {
-            throw new \RuntimeException('Unable to retrieve server info');
-        }
-
-        $comparation = version_compare($version, $expectedVersion);
-
-        if ($match = eval("return $comparation $operator 0;")) {
-            call_user_func($callback, $this, $version);
-        }
-
-        return $match;
-    }
-
-    /**
-     * @param  string $expectedVersion Expected redis version
-     * @param  string $operator Comparison operator.
-     * @throws \PHPUnit_Framework_SkippedTestError when expected redis version is not met
-     */
-    protected function executeOnProfileVersion($expectedVersion, $operator, $callback)
-    {
-        $profile = $this->getProfile();
-        $comparation = version_compare($profile->getVersion(), $expectedVersion);
-
-        if ($match = eval("return $comparation $operator 0;")) {
-            call_user_func($callback, $this, $version);
-        }
-
-        return $match;
-    }
-
-    /**
-     * @param  string $expectedVersion Expected redis version.
-     * @param  string $message Optional message.
-     * @param  bool $remote Based on local profile or remote redis version.
-     * @throws \RuntimeException when unable to retrieve server info or redis version
-     * @throws \PHPUnit_Framework_SkippedTestError when expected redis version is not met
-     */
-    protected function markTestSkippedOnRedisVersionBelow($expectedVersion, $message = '', $remote = true)
-    {
-        $callback = function ($test, $version) use ($message, $expectedVersion) {
-            $test->markTestSkipped($message ?: "Test requires Redis $expectedVersion, current is $version.");
-        };
-
-        $method = $remote ? 'executeOnRedisVersion' : 'executeOnProfileVersion';
-        $this->$method($expectedVersion, '<', $callback);
-    }
-
-    /**
-     * @group disconnected
-     */
-    public function testRawArguments()
-    {
-        $expected = array('1st', '2nd', '3rd', '4th');
-
-        $command = $this->getCommand();
-        $command->setRawArguments($expected);
-
-        $this->assertSame($expected, $command->getArguments());
-    }
-}

+ 127 - 0
tests/PHPUnit/PredisCommandTestCase.php

@@ -0,0 +1,127 @@
+<?php
+
+/*
+ * This file is part of the Predis package.
+ *
+ * (c) Daniele Alessandri <suppakilla@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Predis\Command;
+
+use PredisTestCase;
+use Predis\Client;
+
+/**
+ *
+ */
+abstract class PredisCommandTestCase extends PredisTestCase
+{
+    /**
+     * Returns the expected command.
+     *
+     * @return CommandInterface|string Instance or FQN of the expected command.
+     */
+    protected abstract function getExpectedCommand();
+
+    /**
+     * Returns the expected command ID.
+     *
+     * @return string
+     */
+    protected abstract function getExpectedId();
+
+    /**
+     * Returns a new command instance.
+     *
+     * @return CommandInterface
+     */
+    public function getCommand()
+    {
+        $command = $this->getExpectedCommand();
+
+        return $command instanceof CommandInterface ? $command : new $command();
+    }
+
+    /**
+     * Returns a new client instance.
+     *
+     * @param bool $connect Flush selected database before returning the client.
+     * @return Client
+     */
+    public function getClient($flushdb = true)
+    {
+        $profile = $this->getProfile();
+
+        if (!$profile->supportsCommand($id = $this->getExpectedId())) {
+            $this->markTestSkipped(
+                "The profile {$profile->getVersion()} does not support command {$id}"
+            );
+        }
+
+        $client = $this->createClient(null, null, $flushdb);
+
+        return $client;
+    }
+
+    /**
+     * Returns wether the command is prefixable or not.
+     *
+     * @return Boolean
+     */
+    protected function isPrefixable()
+    {
+        return $this->getCommand() instanceof PrefixableCommandInterface;
+    }
+
+    /**
+     * Returns a new command instance with the specified arguments.
+     *
+     * @param ... List of arguments for the command.
+     * @return CommandInterface
+     */
+    protected function getCommandWithArguments(/* arguments */)
+    {
+        return $this->getCommandWithArgumentsArray(func_get_args());
+    }
+
+    /**
+     * Returns a new command instance with the specified arguments.
+     *
+     * @param array $arguments Arguments for the command.
+     * @return CommandInterface
+     */
+    protected function getCommandWithArgumentsArray(Array $arguments)
+    {
+        $command = $this->getCommand();
+        $command->setArguments($arguments);
+
+        return $command;
+    }
+
+    /**
+     * @group disconnected
+     */
+    public function testCommandId()
+    {
+        $command = $this->getCommand();
+
+        $this->assertInstanceOf('Predis\Command\CommandInterface', $command);
+        $this->assertEquals($this->getExpectedId(), $command->getId());
+    }
+
+    /**
+     * @group disconnected
+     */
+    public function testRawArguments()
+    {
+        $expected = array('1st', '2nd', '3rd', '4th');
+
+        $command = $this->getCommand();
+        $command->setRawArguments($expected);
+
+        $this->assertSame($expected, $command->getArguments());
+    }
+}

+ 2 - 28
tests/PHPUnit/ConnectionTestCase.php → tests/PHPUnit/PredisConnectionTestCase.php

@@ -11,14 +11,13 @@
 
 namespace Predis\Connection;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
-
+use PredisTestCase;
 use Predis\Profile\ServerProfile;
 
 /**
  * @group realm-connection
  */
-abstract class ConnectionTestCase extends StandardTestCase
+abstract class PredisConnectionTestCase extends PredisTestCase
 {
     /**
      * @group disconnected
@@ -322,31 +321,6 @@ abstract class ConnectionTestCase extends StandardTestCase
         );
     }
 
-    /**
-     * Returns a new instance of connection parameters.
-     *
-     * @param array $additional Additional connection parameters.
-     * @return ConnectionParameters Default connection parameters.
-     */
-    protected function getParameters($additional = array())
-    {
-        $parameters = array_merge($this->getDefaultParametersArray(), $additional);
-        $parameters = new ConnectionParameters($parameters);
-
-        return $parameters;
-    }
-
-    /**
-     * Returns a new instance of server profile.
-     *
-     * @param array $additional Additional connection parameters.
-     * @return ServerProfile
-     */
-    protected function getProfile($version = null)
-    {
-        return ServerProfile::get($version ?: REDIS_SERVER_VERSION);
-    }
-
     /**
      * Returns a new instance of a connection instance.
      *

+ 2 - 2
tests/PHPUnit/DistributionStrategyTestCase.php → tests/PHPUnit/PredisDistributorTestCase.php

@@ -11,12 +11,12 @@
 
 namespace Predis\Cluster\Distribution;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  *
  */
-abstract class DistributionStrategyTestCase extends StandardTestCase
+abstract class PredisDistributorTestCase extends PredisTestCase
 {
     /**
      * Returns a new instance of the tested distributor.

+ 8 - 5
tests/PHPUnit/ServerVersionTestCase.php → tests/PHPUnit/PredisProfileTestCase.php

@@ -11,19 +11,22 @@
 
 namespace Predis\Profile;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  *
  */
-abstract class ServerVersionTestCase extends StandardTestCase
+abstract class PredisProfileTestCase extends PredisTestCase
 {
     /**
      * Returns a new instance of the tested profile.
      *
      * @return ServerProfileInterface
      */
-    protected abstract function getProfileInstance();
+    protected function getProfile($version = null)
+    {
+        $this->markTestIncomplete("Server profile must be defined in ".get_class($this));
+    }
 
     /**
      * Returns the expected version string for the tested profile.
@@ -58,7 +61,7 @@ abstract class ServerVersionTestCase extends StandardTestCase
      */
     public function testGetVersion()
     {
-        $profile = $this->getProfileInstance();
+        $profile = $this->getProfile();
 
         $this->assertEquals($this->getExpectedVersion(), $profile->getVersion());
     }
@@ -68,7 +71,7 @@ abstract class ServerVersionTestCase extends StandardTestCase
      */
     public function testSupportedCommands()
     {
-        $profile = $this->getProfileInstance();
+        $profile = $this->getProfile();
         $expected = $this->getExpectedCommands();
         $commands = $this->getCommands($profile);
 

+ 233 - 0
tests/PHPUnit/PredisTestCase.php

@@ -0,0 +1,233 @@
+<?php
+
+/*
+ * This file is part of the Predis package.
+ *
+ * (c) Daniele Alessandri <suppakilla@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+use Predis\Client;
+use Predis\Command\CommandInterface;
+use Predis\Connection\ConnectionParameters;
+use Predis\Profile\ServerProfile;
+use Predis\Profile\ServerProfileInterface;
+
+/**
+ * Base test case class for the Predis test suite.
+ */
+abstract class PredisTestCase extends PHPUnit_Framework_TestCase
+{
+    /**
+     * Verifies that a Redis command is a valid Predis\Command\CommandInterface
+     * instance with the specified ID and command arguments.
+     *
+     * @param string|CommandInterface $command Expected command or command ID.
+     * @param array $arguments Expected command arguments.
+     */
+    public function isRedisCommand($command = null, array $arguments = null)
+    {
+        return new RedisCommandConstraint($command, $arguments);
+    }
+
+    /**
+     * Verifies that a Redis command is a valid Predis\Command\CommandInterface
+     * instance with the specified ID and command arguments. The comparison does
+     * not check for identity when passing a Predis\Command\CommandInterface
+     * instance for $expected.
+     *
+     * @param array|string|CommandInterface $expected Expected command.
+     * @param mixed $actual Actual command.
+     */
+    public function assertRedisCommand($expected, $actual)
+    {
+        if (is_array($expected)) {
+            @list($command, $arguments) = $expected;
+        } else {
+            $command = $expected;
+            $arguments = null;
+        }
+
+        $this->assertThat($actual, new RedisCommandConstraint($command, $arguments));
+    }
+
+    /**
+     * Asserts that two arrays have the same values, even if with different order.
+     *
+     * @param array $expected Expected array.
+     * @param array $actual Actual array.
+     */
+    public function assertSameValues(array $expected, array $actual)
+    {
+        $this->assertThat($actual, new ArrayHasSameValuesConstraint($expected));
+    }
+
+    /**
+     * Returns a named array with the default connection parameters and their values.
+     *
+     * @return array Default connection parameters.
+     */
+    protected function getDefaultParametersArray()
+    {
+        return array(
+            'scheme' => 'tcp',
+            'host' => REDIS_SERVER_HOST,
+            'port' => REDIS_SERVER_PORT,
+            'database' => REDIS_SERVER_DBNUM,
+        );
+    }
+
+    /**
+     * Returns a named array with the default client options and their values.
+     *
+     * @return array Default connection parameters.
+     */
+    protected function getDefaultOptionsArray()
+    {
+        return array(
+            'profile' => REDIS_SERVER_VERSION,
+        );
+    }
+
+    /**
+     * Returns a named array with the default connection parameters merged with
+     * the specified additional parameters.
+     *
+     * @param array $additional Additional connection parameters.
+     * @return array Connection parameters.
+     */
+    protected function getParametersArray(array $additional)
+    {
+        return array_merge($this->getDefaultParametersArray(), $additional);
+    }
+
+    /**
+     * Returns a new instance of connection parameters.
+     *
+     * @param array $additional Additional connection parameters.
+     * @return Connection\ConnectionParameters Default connection parameters.
+     */
+    protected function getParameters($additional = array())
+    {
+        $parameters = array_merge($this->getDefaultParametersArray(), $additional);
+        $parameters = new ConnectionParameters($parameters);
+
+        return $parameters;
+    }
+
+    /**
+     * Returns a new instance of server profile.
+     *
+     * @param array $additional Additional connection parameters.
+     * @return ServerProfileInterface
+     */
+    protected function getProfile($version = null)
+    {
+        return ServerProfile::get($version ?: REDIS_SERVER_VERSION);
+    }
+
+    /**
+     * Returns a new client instance.
+     *
+     * @param bool $connect Flush selected database before returning the client.
+     * @return Client
+     */
+    protected function createClient(array $parameters = null, array $options = null, $flushdb = true)
+    {
+        $parameters = array_merge(
+            $this->getDefaultParametersArray(),
+            $parameters ?: array()
+        );
+
+        $options = array_merge(
+            array(
+                'profile' => $this->getProfile(),
+            ),
+            $options ?: array()
+        );
+
+        $client = new Client($parameters, $options);
+        $client->connect();
+
+        if ($flushdb) {
+            $client->flushdb();
+        }
+
+        return $client;
+    }
+
+    /**
+     * @param  string $expectedVersion Expected redis version
+     * @param  string $operator Comparison operator.
+     * @throws \PHPUnit_Framework_SkippedTestError when expected redis version is not met
+     */
+    protected function executeOnRedisVersion($expectedVersion, $operator, $callback)
+    {
+        $client = $this->createClient(null, null, true);
+        $info = array_change_key_case($client->info());
+
+        if (isset($info['server']['redis_version'])) {
+            // Redis >= 2.6
+            $version = $info['server']['redis_version'];
+        } else if (isset($info['redis_version'])) {
+            // Redis < 2.6
+            $version = $info['redis_version'];
+        } else {
+            throw new RuntimeException('Unable to retrieve server info');
+        }
+
+        $comparation = version_compare($version, $expectedVersion);
+
+        if ($match = eval("return $comparation $operator 0;")) {
+            call_user_func($callback, $this, $version);
+        }
+
+        return $match;
+    }
+
+    /**
+     * @param  string $expectedVersion Expected redis version
+     * @param  string $operator Comparison operator.
+     * @throws \PHPUnit_Framework_SkippedTestError when expected redis version is not met
+     */
+    protected function executeOnProfileVersion($expectedVersion, $operator, $callback)
+    {
+        $profile = $this->getProfile();
+        $comparation = version_compare($profile->getVersion(), $expectedVersion);
+
+        if ($match = eval("return $comparation $operator 0;")) {
+            call_user_func($callback, $this, $version);
+        }
+
+        return $match;
+    }
+
+    /**
+     * @param  string $expectedVersion Expected redis version.
+     * @param  string $message Optional message.
+     * @param  bool $remote Based on local profile or remote redis version.
+     * @throws RuntimeException when unable to retrieve server info or redis version
+     * @throws \PHPUnit_Framework_SkippedTestError when expected redis version is not met
+     */
+    public function markTestSkippedOnRedisVersionBelow($expectedVersion, $message = '', $remote = true)
+    {
+        $callback = function ($test, $version) use ($message, $expectedVersion) {
+            $test->markTestSkipped($message ?: "Test requires Redis $expectedVersion, current is $version.");
+        };
+
+        $method = $remote ? 'executeOnRedisVersion' : 'executeOnProfileVersion';
+        $this->$method($expectedVersion, '<', $callback);
+    }
+
+    /**
+     * Sleep the test case with microseconds resolution.
+     *
+     * @param float $seconds Seconds to sleep.
+     */
+    protected function sleep($seconds)
+    {
+        usleep($seconds * 1000000);
+    }
+}

+ 2 - 2
tests/Predis/ClientExceptionTest.php

@@ -11,12 +11,12 @@
 
 namespace Predis;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  *
  */
-class ClientExceptionTest extends StandardTestCase
+class ClientExceptionTest extends PredisTestCase
 {
     /**
      * @group disconnected

+ 2 - 42
tests/Predis/ClientTest.php

@@ -11,8 +11,7 @@
 
 namespace Predis;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
-
+use PredisTestCase;
 use Predis\Connection\ConnectionFactory;
 use Predis\Connection\MasterSlaveReplication;
 use Predis\Connection\PredisCluster;
@@ -21,7 +20,7 @@ use Predis\Profile\ServerProfile;
 /**
  *
  */
-class ClientTest extends StandardTestCase
+class ClientTest extends PredisTestCase
 {
     /**
      * @group disconnected
@@ -752,45 +751,6 @@ class ClientTest extends StandardTestCase
     // ---- HELPER METHODS ------------------------------------------------ //
     // ******************************************************************** //
 
-    /**
-     * Returns a named array with the default connection parameters and their values.
-     *
-     * @return Array Default connection parameters.
-     */
-    protected function getDefaultParametersArray()
-    {
-        return array(
-            'scheme' => 'tcp',
-            'host' => REDIS_SERVER_HOST,
-            'port' => REDIS_SERVER_PORT,
-            'database' => REDIS_SERVER_DBNUM,
-        );
-    }
-
-    /**
-     * Returns a named array with the default client options and their values.
-     *
-     * @return Array Default connection parameters.
-     */
-    protected function getDefaultOptionsArray()
-    {
-        return array(
-            'profile' => REDIS_SERVER_VERSION,
-        );
-    }
-
-    /**
-     * Returns a named array with the default connection parameters merged with
-     * the specified additional parameters.
-     *
-     * @param Array $additional Additional connection parameters.
-     * @return Array Connection parameters.
-     */
-    protected function getParametersArray(Array $additional)
-    {
-        return array_merge($this->getDefaultParametersArray(), $additional);
-    }
-
     /**
      * Returns an URI string representation of the specified connection parameters.
      *

+ 2 - 2
tests/Predis/Cluster/Distribution/EmptyRingExceptionTest.php

@@ -11,12 +11,12 @@
 
 namespace Predis\Cluster\Distribution;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @todo Not really useful right now.
  */
-class EmptyRingExceptionTest extends StandardTestCase
+class EmptyRingExceptionTest extends PredisTestCase
 {
     /**
      * @group disconnected

+ 1 - 1
tests/Predis/Cluster/Distribution/HashRingTest.php

@@ -14,7 +14,7 @@ namespace Predis\Cluster\Distribution;
 /**
  * @todo To be improved.
  */
-class HashRingTest extends DistributionStrategyTestCase
+class HashRingTest extends PredisDistributorTestCase
 {
     /**
      * {@inheritdoc}

+ 1 - 1
tests/Predis/Cluster/Distribution/KetamaPureRingTest.php

@@ -14,7 +14,7 @@ namespace Predis\Cluster\Distribution;
 /**
  * @todo To be improved.
  */
-class KetamaPureRingTest extends DistributionStrategyTestCase
+class KetamaPureRingTest extends PredisDistributorTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 3
tests/Predis/Cluster/PredisClusterHashStrategyTest.php

@@ -11,15 +11,14 @@
 
 namespace Predis\Cluster;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
-
+use PredisTestCase;
 use Predis\Cluster\Distribution\HashRing;
 use Predis\Profile\ServerProfile;
 
 /**
  *
  */
-class PredisClusterHashStrategyTest extends StandardTestCase
+class PredisClusterHashStrategyTest extends PredisTestCase
 {
     /**
      * @group disconnected

+ 2 - 3
tests/Predis/Cluster/RedisClusterHashStrategyTest.php

@@ -11,14 +11,13 @@
 
 namespace Predis\Cluster;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
-
+use PredisTestCase;
 use Predis\Profile\ServerProfile;
 
 /**
  *
  */
-class RedisClusterHashStrategyTest extends StandardTestCase
+class RedisClusterHashStrategyTest extends PredisTestCase
 {
     /**
      * @group disconnected

+ 2 - 3
tests/Predis/Collection/Iterator/HashKeyTest.php

@@ -11,15 +11,14 @@
 
 namespace Predis\Collection\Iterator;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
-
+use PredisTestCase;
 use Predis\Client;
 use Predis\Profile\ServerProfile;
 
 /**
  * @group realm-iterators
  */
-class HashKeyTest extends StandardTestCase
+class HashKeyTest extends PredisTestCase
 {
     /**
      * @group disconnected

+ 2 - 3
tests/Predis/Collection/Iterator/KeyspaceTest.php

@@ -11,15 +11,14 @@
 
 namespace Predis\Collection\Iterator;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
-
+use PredisTestCase;
 use Predis\Client;
 use Predis\Profile\ServerProfile;
 
 /**
  * @group realm-iterators
  */
-class KeyspaceTest extends StandardTestCase
+class KeyspaceTest extends PredisTestCase
 {
     /**
      * @group disconnected

+ 2 - 3
tests/Predis/Collection/Iterator/ListKeyTest.php

@@ -11,15 +11,14 @@
 
 namespace Predis\Collection\Iterator;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
-
+use PredisTestCase;
 use Predis\Client;
 use Predis\Profile\ServerProfile;
 
 /**
  * @group realm-iterators
  */
-class ListKeyTest extends StandardTestCase
+class ListKeyTest extends PredisTestCase
 {
     /**
      * @group disconnected

+ 2 - 3
tests/Predis/Collection/Iterator/SetKeyTest.php

@@ -11,15 +11,14 @@
 
 namespace Predis\Collection\Iterator;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
-
+use PredisTestCase;
 use Predis\Client;
 use Predis\Profile\ServerProfile;
 
 /**
  * @group realm-iterators
  */
-class SetKeyTest extends StandardTestCase
+class SetKeyTest extends PredisTestCase
 {
     /**
      * @group disconnected

+ 2 - 3
tests/Predis/Collection/Iterator/SortedSetKeyTest.php

@@ -11,15 +11,14 @@
 
 namespace Predis\Collection\Iterator;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
-
+use PredisTestCase;
 use Predis\Client;
 use Predis\Profile\ServerProfile;
 
 /**
  * @group realm-iterators
  */
-class SortedSetTest extends StandardTestCase
+class SortedSetTest extends PredisTestCase
 {
     /**
      * @group disconnected

+ 2 - 2
tests/Predis/Command/CommandTest.php

@@ -11,12 +11,12 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  *
  */
-class CommandTest extends StandardTestCase
+class CommandTest extends PredisTestCase
 {
     /**
      * @group disconnected

+ 2 - 2
tests/Predis/Command/ConnectionAuthTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-connection
  */
-class ConnectionAuthTest extends CommandTestCase
+class ConnectionAuthTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ConnectionEchoTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-connection
  */
-class ConnectionEchoTest extends CommandTestCase
+class ConnectionEchoTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ConnectionPingTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-connection
  */
-class ConnectionPingTest extends CommandTestCase
+class ConnectionPingTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ConnectionQuitTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-connection
  */
-class ConnectionQuitTest extends CommandTestCase
+class ConnectionQuitTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ConnectionSelectTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-connection
  */
-class ConnectionSelectTest extends CommandTestCase
+class ConnectionSelectTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/HashDeleteTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-hash
  */
-class HashDeleteTest extends CommandTestCase
+class HashDeleteTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/HashExistsTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-hash
  */
-class HashExistsTest extends CommandTestCase
+class HashExistsTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/HashGetAllTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-hash
  */
-class HashGetAllTest extends CommandTestCase
+class HashGetAllTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/HashGetMultipleTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-hash
  */
-class HashGetMultipleTest extends CommandTestCase
+class HashGetMultipleTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/HashGetTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-hash
  */
-class HashGetTest extends CommandTestCase
+class HashGetTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/HashIncrementByFloatTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-hash
  */
-class HashIncrementByFloatTest extends CommandTestCase
+class HashIncrementByFloatTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/HashIncrementByTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-hash
  */
-class HashIncrementByTest extends CommandTestCase
+class HashIncrementByTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/HashKeysTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-hash
  */
-class HashKeysTest extends CommandTestCase
+class HashKeysTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/HashLengthTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-hash
  */
-class HashLengthTest extends CommandTestCase
+class HashLengthTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/HashScanTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-hash
  */
-class HashScanTest extends CommandTestCase
+class HashScanTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/HashSetMultipleTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-hash
  */
-class HashSetMultipleTest extends CommandTestCase
+class HashSetMultipleTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/HashSetPreserveTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-hash
  */
-class HashSetPreserveTest extends CommandTestCase
+class HashSetPreserveTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/HashSetTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-hash
  */
-class HashSetTest extends CommandTestCase
+class HashSetTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/HashValuesTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-hash
  */
-class HashValuesTest extends CommandTestCase
+class HashValuesTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/KeyDeleteTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-key
  */
-class KeyDeleteTest extends CommandTestCase
+class KeyDeleteTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/KeyDumpTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-key
  */
-class KeyDumpTest extends CommandTestCase
+class KeyDumpTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/KeyExistsTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-key
  */
-class KeyExistsTest extends CommandTestCase
+class KeyExistsTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/KeyExpireAtTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-key
  */
-class KeyExpireAtTest extends CommandTestCase
+class KeyExpireAtTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/KeyExpireTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-key
  */
-class KeyExpireTest extends CommandTestCase
+class KeyExpireTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/KeyKeysTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-key
  */
-class KeyKeysTest extends CommandTestCase
+class KeyKeysTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/KeyKeysV12xTest.php

@@ -11,7 +11,7 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * We only perform disconnected tests for this commands because
@@ -21,7 +21,7 @@ use \PHPUnit_Framework_TestCase as StandardTestCase;
  * @group commands
  * @group realm-key
  */
-class KeyKeysV12xTest extends CommandTestCase
+class KeyKeysV12xTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/KeyMoveTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-key
  */
-class KeyMoveTest extends CommandTestCase
+class KeyMoveTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/KeyPersistTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-key
  */
-class KeyPersistTest extends CommandTestCase
+class KeyPersistTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/KeyPreciseExpireAtTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-key
  */
-class KeyPreciseExpireAtTest extends CommandTestCase
+class KeyPreciseExpireAtTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/KeyPreciseExpireTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-key
  */
-class KeyPreciseExpireTest extends CommandTestCase
+class KeyPreciseExpireTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/KeyPreciseTimeToLiveTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-key
  */
-class KeyPreciseTimeToLiveTest extends CommandTestCase
+class KeyPreciseTimeToLiveTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/KeyRandomTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-key
  */
-class KeyRandomTest extends CommandTestCase
+class KeyRandomTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/KeyRenamePreserveTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-key
  */
-class KeyRenamePreserveTest extends CommandTestCase
+class KeyRenamePreserveTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/KeyRenameTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-key
  */
-class KeyRenameTest extends CommandTestCase
+class KeyRenameTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/KeyRestoreTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-key
  */
-class KeyRestoreTest extends CommandTestCase
+class KeyRestoreTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 3
tests/Predis/Command/KeyScanTest.php

@@ -11,13 +11,12 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
-
+use PredisTestCase;
 /**
  * @group commands
  * @group realm-key
  */
-class KeyScanTest extends CommandTestCase
+class KeyScanTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/KeySortTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-key
  */
-class KeySortTest extends CommandTestCase
+class KeySortTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/KeyTimeToLiveTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-key
  */
-class KeyTimeToLiveTest extends CommandTestCase
+class KeyTimeToLiveTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/KeyTypeTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-key
  */
-class KeyTypeTest extends CommandTestCase
+class KeyTypeTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ListIndexTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-list
  */
-class ListIndexTest extends CommandTestCase
+class ListIndexTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ListInsertTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-list
  */
-class ListInsertTest extends CommandTestCase
+class ListInsertTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ListLengthTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-list
  */
-class ListLengthTest extends CommandTestCase
+class ListLengthTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ListPopFirstBlockingTest.php

@@ -11,7 +11,7 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
@@ -19,7 +19,7 @@ use \PHPUnit_Framework_TestCase as StandardTestCase;
  * @todo Testing blocking pop operations against Redis using PHP is
  *       tricky, so we will skip these kind of tests for now.
  */
-class ListPopFirstBlockingTest extends CommandTestCase
+class ListPopFirstBlockingTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ListPopFirstTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-list
  */
-class ListPopFirstTest extends CommandTestCase
+class ListPopFirstTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ListPopLastBlockingTest.php

@@ -11,7 +11,7 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
@@ -19,7 +19,7 @@ use \PHPUnit_Framework_TestCase as StandardTestCase;
  * @todo Testing blocking pop operations against Redis using PHP is
  *       tricky, so we will skip these kind of tests for now.
  */
-class ListPopLastBlockingTest extends CommandTestCase
+class ListPopLastBlockingTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ListPopLastPushHeadBlockingTest.php

@@ -11,7 +11,7 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
@@ -19,7 +19,7 @@ use \PHPUnit_Framework_TestCase as StandardTestCase;
  * @todo Testing blocking pop operations against Redis using PHP is
  *       tricky, so we will skip these kind of tests for now.
  */
-class ListPopLastPushHeadBlockingTest extends CommandTestCase
+class ListPopLastPushHeadBlockingTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ListPopLastPushHeadTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-list
  */
-class ListPopLastPushHeadTest extends CommandTestCase
+class ListPopLastPushHeadTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ListPopLastTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-list
  */
-class ListPopLastTest extends CommandTestCase
+class ListPopLastTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ListPushHeadTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-list
  */
-class ListPushHeadTest extends CommandTestCase
+class ListPushHeadTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ListPushHeadXTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-list
  */
-class ListPushHeadXTest extends CommandTestCase
+class ListPushHeadXTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ListPushTailTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-list
  */
-class ListPushTailTest extends CommandTestCase
+class ListPushTailTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ListPushTailXTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-list
  */
-class ListPushTailXTest extends CommandTestCase
+class ListPushTailXTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ListRangeTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-list
  */
-class ListRangeTest extends CommandTestCase
+class ListRangeTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ListRemoveTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-list
  */
-class ListRemoveTest extends CommandTestCase
+class ListRemoveTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ListSetTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-list
  */
-class ListSetTest extends CommandTestCase
+class ListSetTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ListTrimTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-list
  */
-class ListTrimTest extends CommandTestCase
+class ListTrimTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/PrefixHelpersTest.php

@@ -11,12 +11,12 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  *
  */
-class PrefixHelpersTest extends StandardTestCase
+class PrefixHelpersTest extends PredisTestCase
 {
     /**
      * @group disconnected

+ 2 - 2
tests/Predis/Command/PrefixableCommandTest.php

@@ -11,12 +11,12 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  *
  */
-class PrefixableCommandTest extends StandardTestCase
+class PrefixableCommandTest extends PredisTestCase
 {
     /**
      * @group disconnected

+ 2 - 2
tests/Predis/Command/Processor/KeyPrefixProcessorTest.php

@@ -11,12 +11,12 @@
 
 namespace Predis\Command\Processor;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  *
  */
-class KeyPrefixProcessorTest extends StandardTestCase
+class KeyPrefixProcessorTest extends PredisTestCase
 {
     /**
      * @group disconnected

+ 2 - 2
tests/Predis/Command/Processor/ProcessorChainTest.php

@@ -11,12 +11,12 @@
 
 namespace Predis\Command\Processor;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  *
  */
-class ProcessorChainTest extends StandardTestCase
+class ProcessorChainTest extends PredisTestCase
 {
     /**
      * @group disconnected

+ 2 - 2
tests/Predis/Command/PubSubPublishTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-pubsub
  */
-class PubSubPublishTest extends CommandTestCase
+class PubSubPublishTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/PubSubSubscribeByPatternTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-pubsub
  */
-class PubSubSubscribeByPatternTest extends CommandTestCase
+class PubSubSubscribeByPatternTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/PubSubSubscribeTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-pubsub
  */
-class PubSubSubscribeTest extends CommandTestCase
+class PubSubSubscribeTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/PubSubUnsubscribeByPatternTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-pubsub
  */
-class PubSubUnsubscribeByPatternTest extends CommandTestCase
+class PubSubUnsubscribeByPatternTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/PubSubUnsubscribeTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-pubsub
  */
-class PubSubUnsubscribeTest extends CommandTestCase
+class PubSubUnsubscribeTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/RawCommandTest.php

@@ -11,12 +11,12 @@
 
 namespace Predis\Command;
 
-use PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  *
  */
-class RawCommandTest extends StandardTestCase
+class RawCommandTest extends PredisTestCase
 {
     /**
      * @group disconnected

+ 2 - 2
tests/Predis/Command/ScriptedCommandTest.php

@@ -11,12 +11,12 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group realm-scripting
  */
-class ScriptedCommandTest extends StandardTestCase
+class ScriptedCommandTest extends PredisTestCase
 {
     const LUA_SCRIPT = 'return { KEYS[1], KEYS[2], ARGV[1], ARGV[2] }';
     const LUA_SCRIPT_SHA1 = '6e07f61f502e36d123fe28523076af588f5c315e';

+ 2 - 2
tests/Predis/Command/ServerBackgroundRewriteAOFTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-server
  */
-class ServerBackgroundRewriteAOFTest extends CommandTestCase
+class ServerBackgroundRewriteAOFTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ServerBackgroundSaveTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-server
  */
-class ServerBackgroundSaveTest extends CommandTestCase
+class ServerBackgroundSaveTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ServerClientTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-server
  */
-class ServerClientTest extends CommandTestCase
+class ServerClientTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ServerConfigTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-server
  */
-class ServerConfigTest extends CommandTestCase
+class ServerConfigTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ServerDatabaseSizeTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-server
  */
-class ServerDatabaseSizeTest extends CommandTestCase
+class ServerDatabaseSizeTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ServerEvalSHATest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-scripting
  */
-class ServerEvalSHATest extends CommandTestCase
+class ServerEvalSHATest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ServerEvalTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-scripting
  */
-class ServerEvalTest extends CommandTestCase
+class ServerEvalTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ServerFlushAllTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-server
  */
-class ServerFlushAllTest extends CommandTestCase
+class ServerFlushAllTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ServerFlushDatabaseTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-server
  */
-class ServerFlushDatabaseTest extends CommandTestCase
+class ServerFlushDatabaseTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ServerInfoTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-server
  */
-class ServerInfoTest extends CommandTestCase
+class ServerInfoTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ServerInfoV26xTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-server
  */
-class ServerInfoV26xTest extends CommandTestCase
+class ServerInfoV26xTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

+ 2 - 2
tests/Predis/Command/ServerLastSaveTest.php

@@ -11,13 +11,13 @@
 
 namespace Predis\Command;
 
-use \PHPUnit_Framework_TestCase as StandardTestCase;
+use PredisTestCase;
 
 /**
  * @group commands
  * @group realm-server
  */
-class ServerLastSaveTest extends CommandTestCase
+class ServerLastSaveTest extends PredisCommandTestCase
 {
     /**
      * {@inheritdoc}

部分文件因文件數量過多而無法顯示