diff --git a/bin/generate-command-test.php b/bin/generate-command-test.php index bfaf1a4c..8613f7db 100755 --- a/bin/generate-command-test.php +++ b/bin/generate-command-test.php @@ -171,8 +171,6 @@ class CommandTestCaseGenerator namespace Predis\Command; -use \PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-$realm diff --git a/tests/PHPUnit/ArrayHasSameValuesConstraint.php b/tests/PHPUnit/ArrayHasSameValuesConstraint.php index 536fd8ed..8bd25e79 100644 --- a/tests/PHPUnit/ArrayHasSameValuesConstraint.php +++ b/tests/PHPUnit/ArrayHasSameValuesConstraint.php @@ -27,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; @@ -46,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(); } } \ No newline at end of file diff --git a/tests/PHPUnit/CommandTestCase.php b/tests/PHPUnit/CommandTestCase.php index 657234df..69c32591 100644 --- a/tests/PHPUnit/CommandTestCase.php +++ b/tests/PHPUnit/CommandTestCase.php @@ -11,15 +11,14 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - +use PredisTestCase; use Predis\Client; use Predis\Profile; /** * */ -abstract class CommandTestCase extends StandardTestCase +abstract class CommandTestCase extends PredisTestCase { /** * Returns the expected command. @@ -47,46 +46,21 @@ abstract class CommandTestCase extends StandardTestCase return $command instanceof CommandInterface ? $command : new $command(); } - /** - * Return the server profile used during the tests. - * - * @return Profile\ProfileInterface - */ - public function getProfile() - { - return Profile\Factory::get(REDIS_SERVER_VERSION); - } - /** * Returns a new client instance. * - * @param Boolean $connect Flush selected database before returning the client. + * @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}"); + if (!$this->getProfile()->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(); - } + $client = $this->createClient(null, null, $flushdb); return $client; } @@ -126,27 +100,6 @@ abstract class CommandTestCase extends StandardTestCase 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 */ @@ -158,69 +111,6 @@ abstract class CommandTestCase extends StandardTestCase $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 */ diff --git a/tests/PHPUnit/ConnectionTestCase.php b/tests/PHPUnit/ConnectionTestCase.php index 83fb40bd..ebadb014 100644 --- a/tests/PHPUnit/ConnectionTestCase.php +++ b/tests/PHPUnit/ConnectionTestCase.php @@ -11,14 +11,13 @@ namespace Predis\Connection; -use PHPUnit_Framework_TestCase as StandardTestCase; - +use PredisTestCase; use Predis\Profile; /** * @group realm-connection */ -abstract class ConnectionTestCase extends StandardTestCase +abstract class ConnectionTestCase 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 Profile\ProfileInterface - */ - protected function getProfile($version = null) - { - return Profile\Factory::get($version ?: REDIS_SERVER_VERSION); - } - /** * Returns a new instance of a connection instance. * diff --git a/tests/PHPUnit/DistributorTestCase.php b/tests/PHPUnit/DistributorTestCase.php index a8a1a8a6..b8aa257f 100644 --- a/tests/PHPUnit/DistributorTestCase.php +++ b/tests/PHPUnit/DistributorTestCase.php @@ -11,12 +11,12 @@ namespace Predis\Cluster\Distributor; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * */ -abstract class DistributorTestCase extends StandardTestCase +abstract class DistributorTestCase extends PredisTestCase { /** * Returns a new instance of the tested distributor. diff --git a/tests/PHPUnit/PredisTestCase.php b/tests/PHPUnit/PredisTestCase.php new file mode 100644 index 00000000..45c04e20 --- /dev/null +++ b/tests/PHPUnit/PredisTestCase.php @@ -0,0 +1,232 @@ + + * + * 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; +use Predis\Connection; +use Predis\Profile; + +/** + * 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 Connection\ConnectionParameters($parameters); + + return $parameters; + } + + /** + * Returns a new instance of server profile. + * + * @param array $additional Additional connection parameters. + * @return Profile\ProfileInterface + */ + protected function getProfile($version = null) + { + return Profile\Factory::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); + } +} diff --git a/tests/PHPUnit/RedisProfileTestCase.php b/tests/PHPUnit/RedisProfileTestCase.php index a6d47b8e..57a1730d 100644 --- a/tests/PHPUnit/RedisProfileTestCase.php +++ b/tests/PHPUnit/RedisProfileTestCase.php @@ -11,21 +11,23 @@ namespace Predis\Profile; -use PHPUnit_Framework_TestCase as StandardTestCase; - +use PredisTestCase; use Predis\Command\Processor\ProcessorChain; /** * */ -abstract class RedisProfileTestCase extends StandardTestCase +abstract class RedisProfileTestCase extends PredisTestCase { /** * Returns a new instance of the tested profile. * * @return ProfileInterface */ - 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. @@ -60,7 +62,7 @@ abstract class RedisProfileTestCase extends StandardTestCase */ public function testGetVersion() { - $profile = $this->getProfileInstance(); + $profile = $this->getProfile(); $this->assertEquals($this->getExpectedVersion(), $profile->getVersion()); } @@ -70,7 +72,7 @@ abstract class RedisProfileTestCase extends StandardTestCase */ public function testSupportedCommands() { - $profile = $this->getProfileInstance(); + $profile = $this->getProfile(); $expected = $this->getExpectedCommands(); $commands = $this->getCommands($profile); @@ -82,7 +84,7 @@ abstract class RedisProfileTestCase extends StandardTestCase */ public function testToString() { - $this->assertEquals($this->getExpectedVersion(), $this->getProfileInstance()); + $this->assertEquals($this->getExpectedVersion(), $this->getProfile()); } /** @@ -90,7 +92,7 @@ abstract class RedisProfileTestCase extends StandardTestCase */ public function testSupportCommand() { - $profile = $this->getProfileInstance(); + $profile = $this->getProfile(); $this->assertTrue($profile->supportsCommand('info')); $this->assertTrue($profile->supportsCommand('INFO')); @@ -104,7 +106,7 @@ abstract class RedisProfileTestCase extends StandardTestCase */ public function testSupportCommands() { - $profile = $this->getProfileInstance(); + $profile = $this->getProfile(); $this->assertTrue($profile->supportsCommands(array('get', 'set'))); $this->assertTrue($profile->supportsCommands(array('GET', 'SET'))); @@ -119,7 +121,7 @@ abstract class RedisProfileTestCase extends StandardTestCase */ public function testGetCommandClass() { - $profile = $this->getProfileInstance(); + $profile = $this->getProfile(); $this->assertSame('Predis\Command\ConnectionPing', $profile->getCommandClass('ping')); $this->assertSame('Predis\Command\ConnectionPing', $profile->getCommandClass('PING')); @@ -133,7 +135,7 @@ abstract class RedisProfileTestCase extends StandardTestCase */ public function testDefineCommand() { - $profile = $this->getProfileInstance(); + $profile = $this->getProfile(); $command = $this->getMock('Predis\Command\CommandInterface'); $profile->defineCommand('mock', get_class($command)); @@ -151,7 +153,7 @@ abstract class RedisProfileTestCase extends StandardTestCase */ public function testDefineInvalidCommand() { - $profile = $this->getProfileInstance(); + $profile = $this->getProfile(); $profile->defineCommand('mock', 'stdClass'); } @@ -161,7 +163,7 @@ abstract class RedisProfileTestCase extends StandardTestCase */ public function testCreateCommandWithoutArguments() { - $profile = $this->getProfileInstance(); + $profile = $this->getProfile(); $command = $profile->createCommand('info'); $this->assertInstanceOf('Predis\Command\CommandInterface', $command); @@ -174,7 +176,7 @@ abstract class RedisProfileTestCase extends StandardTestCase */ public function testCreateCommandWithArguments() { - $profile = $this->getProfileInstance(); + $profile = $this->getProfile(); $arguments = array('foo', 'bar'); $command = $profile->createCommand('set', $arguments); @@ -190,7 +192,7 @@ abstract class RedisProfileTestCase extends StandardTestCase */ public function testCreateUndefinedCommand() { - $profile = $this->getProfileInstance(); + $profile = $this->getProfile(); $profile->createCommand('unknown'); } @@ -199,7 +201,7 @@ abstract class RedisProfileTestCase extends StandardTestCase */ public function testGetDefaultProcessor() { - $profile = $this->getProfileInstance(); + $profile = $this->getProfile(); $this->assertNull($profile->getProcessor()); } @@ -211,7 +213,7 @@ abstract class RedisProfileTestCase extends StandardTestCase { $processor = $this->getMock('Predis\Command\Processor\CommandProcessorInterface'); - $profile = $this->getProfileInstance(); + $profile = $this->getProfile(); $profile->setProcessor($processor); $this->assertSame($processor, $profile->getProcessor()); @@ -223,7 +225,7 @@ abstract class RedisProfileTestCase extends StandardTestCase public function testSetAndUnsetProcessor() { $processor = $this->getMock('Predis\Command\Processor\CommandProcessorInterface'); - $profile = $this->getProfileInstance(); + $profile = $this->getProfile(); $profile->setProcessor($processor); $this->assertSame($processor, $profile->getProcessor()); @@ -249,7 +251,7 @@ abstract class RedisProfileTestCase extends StandardTestCase $cmd->setRawArguments($argsRef = array_map('strtoupper', $cmd->getArguments())); })); - $profile = $this->getProfileInstance(); + $profile = $this->getProfile(); $profile->setProcessor($processor); $command = $profile->createCommand('set', array('foo', 'bar')); @@ -269,7 +271,7 @@ abstract class RedisProfileTestCase extends StandardTestCase $chain->add($processor); $chain->add($processor); - $profile = $this->getProfileInstance(); + $profile = $this->getProfile(); $profile->setProcessor($chain); $profile->createCommand('info'); } diff --git a/tests/Predis/ClientExceptionTest.php b/tests/Predis/ClientExceptionTest.php index 1702d9bc..73471495 100644 --- a/tests/Predis/ClientExceptionTest.php +++ b/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 diff --git a/tests/Predis/ClientTest.php b/tests/Predis/ClientTest.php index fb238e38..c6bc22dd 100644 --- a/tests/Predis/ClientTest.php +++ b/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; @@ -22,7 +21,7 @@ use Predis\Response; /** * */ -class ClientTest extends StandardTestCase +class ClientTest extends PredisTestCase { /** * @group disconnected @@ -756,45 +755,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. * diff --git a/tests/Predis/Cluster/Distributor/EmptyRingExceptionTest.php b/tests/Predis/Cluster/Distributor/EmptyRingExceptionTest.php index ccc0b6a2..2f04970a 100644 --- a/tests/Predis/Cluster/Distributor/EmptyRingExceptionTest.php +++ b/tests/Predis/Cluster/Distributor/EmptyRingExceptionTest.php @@ -11,12 +11,12 @@ namespace Predis\Cluster\Distributor; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * @todo Not really useful right now. */ -class EmptyRingExceptionTest extends StandardTestCase +class EmptyRingExceptionTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Cluster/PredisStrategyTest.php b/tests/Predis/Cluster/PredisStrategyTest.php index 7b3a58b6..7f3fc3e7 100644 --- a/tests/Predis/Cluster/PredisStrategyTest.php +++ b/tests/Predis/Cluster/PredisStrategyTest.php @@ -11,14 +11,13 @@ namespace Predis\Cluster; -use PHPUnit_Framework_TestCase as StandardTestCase; - +use PredisTestCase; use Predis\Profile; /** * */ -class PredisStrategyTest extends StandardTestCase +class PredisStrategyTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Cluster/RedisStrategyTest.php b/tests/Predis/Cluster/RedisStrategyTest.php index 519f7d5a..134c4b7f 100644 --- a/tests/Predis/Cluster/RedisStrategyTest.php +++ b/tests/Predis/Cluster/RedisStrategyTest.php @@ -11,14 +11,13 @@ namespace Predis\Cluster; -use PHPUnit_Framework_TestCase as StandardTestCase; - +use PredisTestCase; use Predis\Profile; /** * */ -class RedisStrategyTest extends StandardTestCase +class RedisStrategyTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Collection/Iterator/HashKeyTest.php b/tests/Predis/Collection/Iterator/HashKeyTest.php index 93f84f89..9e73f32e 100644 --- a/tests/Predis/Collection/Iterator/HashKeyTest.php +++ b/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; /** * @group realm-iterators */ -class HashKeyTest extends StandardTestCase +class HashKeyTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Collection/Iterator/KeyspaceTest.php b/tests/Predis/Collection/Iterator/KeyspaceTest.php index 2fadaab2..c5c1a5cf 100644 --- a/tests/Predis/Collection/Iterator/KeyspaceTest.php +++ b/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; /** * @group realm-iterators */ -class KeyspaceTest extends StandardTestCase +class KeyspaceTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Collection/Iterator/ListKeyTest.php b/tests/Predis/Collection/Iterator/ListKeyTest.php index e4ff7327..ad5a3327 100644 --- a/tests/Predis/Collection/Iterator/ListKeyTest.php +++ b/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; /** * @group realm-iterators */ -class ListKeyTest extends StandardTestCase +class ListKeyTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Collection/Iterator/SetKeyTest.php b/tests/Predis/Collection/Iterator/SetKeyTest.php index 43e5edac..cfe9915f 100644 --- a/tests/Predis/Collection/Iterator/SetKeyTest.php +++ b/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; /** * @group realm-iterators */ -class SetKeyTest extends StandardTestCase +class SetKeyTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Collection/Iterator/SortedSetKeyTest.php b/tests/Predis/Collection/Iterator/SortedSetKeyTest.php index ae9b5314..94719b88 100644 --- a/tests/Predis/Collection/Iterator/SortedSetKeyTest.php +++ b/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; /** * @group realm-iterators */ -class SortedSetTest extends StandardTestCase +class SortedSetTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Command/CommandTest.php b/tests/Predis/Command/CommandTest.php index a4317478..d31f0647 100644 --- a/tests/Predis/Command/CommandTest.php +++ b/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 diff --git a/tests/Predis/Command/ConnectionAuthTest.php b/tests/Predis/Command/ConnectionAuthTest.php index db02fa0d..3997fe98 100644 --- a/tests/Predis/Command/ConnectionAuthTest.php +++ b/tests/Predis/Command/ConnectionAuthTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-connection diff --git a/tests/Predis/Command/ConnectionEchoTest.php b/tests/Predis/Command/ConnectionEchoTest.php index f8ad3459..ad729f3e 100644 --- a/tests/Predis/Command/ConnectionEchoTest.php +++ b/tests/Predis/Command/ConnectionEchoTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-connection diff --git a/tests/Predis/Command/ConnectionPingTest.php b/tests/Predis/Command/ConnectionPingTest.php index 1b6b377e..34faa377 100644 --- a/tests/Predis/Command/ConnectionPingTest.php +++ b/tests/Predis/Command/ConnectionPingTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-connection diff --git a/tests/Predis/Command/ConnectionQuitTest.php b/tests/Predis/Command/ConnectionQuitTest.php index ef76dc6d..1e964384 100644 --- a/tests/Predis/Command/ConnectionQuitTest.php +++ b/tests/Predis/Command/ConnectionQuitTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-connection diff --git a/tests/Predis/Command/ConnectionSelectTest.php b/tests/Predis/Command/ConnectionSelectTest.php index 3fca4be5..12930650 100644 --- a/tests/Predis/Command/ConnectionSelectTest.php +++ b/tests/Predis/Command/ConnectionSelectTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-connection diff --git a/tests/Predis/Command/HashDeleteTest.php b/tests/Predis/Command/HashDeleteTest.php index 3ea76ec2..a3b3e60a 100644 --- a/tests/Predis/Command/HashDeleteTest.php +++ b/tests/Predis/Command/HashDeleteTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-hash diff --git a/tests/Predis/Command/HashExistsTest.php b/tests/Predis/Command/HashExistsTest.php index eabd513e..4776794a 100644 --- a/tests/Predis/Command/HashExistsTest.php +++ b/tests/Predis/Command/HashExistsTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-hash diff --git a/tests/Predis/Command/HashGetAllTest.php b/tests/Predis/Command/HashGetAllTest.php index a078ce0e..5e9335f3 100644 --- a/tests/Predis/Command/HashGetAllTest.php +++ b/tests/Predis/Command/HashGetAllTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-hash diff --git a/tests/Predis/Command/HashGetMultipleTest.php b/tests/Predis/Command/HashGetMultipleTest.php index 2b28118a..7fa67bae 100644 --- a/tests/Predis/Command/HashGetMultipleTest.php +++ b/tests/Predis/Command/HashGetMultipleTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-hash diff --git a/tests/Predis/Command/HashGetTest.php b/tests/Predis/Command/HashGetTest.php index 1f60a316..756f95eb 100644 --- a/tests/Predis/Command/HashGetTest.php +++ b/tests/Predis/Command/HashGetTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-hash diff --git a/tests/Predis/Command/HashIncrementByFloatTest.php b/tests/Predis/Command/HashIncrementByFloatTest.php index ca2ef666..2a1ceae7 100644 --- a/tests/Predis/Command/HashIncrementByFloatTest.php +++ b/tests/Predis/Command/HashIncrementByFloatTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-hash diff --git a/tests/Predis/Command/HashIncrementByTest.php b/tests/Predis/Command/HashIncrementByTest.php index 42de193a..b7df800b 100644 --- a/tests/Predis/Command/HashIncrementByTest.php +++ b/tests/Predis/Command/HashIncrementByTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-hash diff --git a/tests/Predis/Command/HashKeysTest.php b/tests/Predis/Command/HashKeysTest.php index 64ab2cdf..f9094e24 100644 --- a/tests/Predis/Command/HashKeysTest.php +++ b/tests/Predis/Command/HashKeysTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-hash diff --git a/tests/Predis/Command/HashLengthTest.php b/tests/Predis/Command/HashLengthTest.php index 1887dd0b..922bfb0b 100644 --- a/tests/Predis/Command/HashLengthTest.php +++ b/tests/Predis/Command/HashLengthTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-hash diff --git a/tests/Predis/Command/HashScanTest.php b/tests/Predis/Command/HashScanTest.php index a55833d3..03c3fbd3 100644 --- a/tests/Predis/Command/HashScanTest.php +++ b/tests/Predis/Command/HashScanTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-hash diff --git a/tests/Predis/Command/HashSetMultipleTest.php b/tests/Predis/Command/HashSetMultipleTest.php index ec2befba..9aa768da 100644 --- a/tests/Predis/Command/HashSetMultipleTest.php +++ b/tests/Predis/Command/HashSetMultipleTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-hash diff --git a/tests/Predis/Command/HashSetPreserveTest.php b/tests/Predis/Command/HashSetPreserveTest.php index 7085464d..56e654dc 100644 --- a/tests/Predis/Command/HashSetPreserveTest.php +++ b/tests/Predis/Command/HashSetPreserveTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-hash diff --git a/tests/Predis/Command/HashSetTest.php b/tests/Predis/Command/HashSetTest.php index 3e93a165..ccaf7c8d 100644 --- a/tests/Predis/Command/HashSetTest.php +++ b/tests/Predis/Command/HashSetTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-hash diff --git a/tests/Predis/Command/HashValuesTest.php b/tests/Predis/Command/HashValuesTest.php index e18eb0e2..badd875c 100644 --- a/tests/Predis/Command/HashValuesTest.php +++ b/tests/Predis/Command/HashValuesTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-hash diff --git a/tests/Predis/Command/KeyDeleteTest.php b/tests/Predis/Command/KeyDeleteTest.php index d062f242..2719ea51 100644 --- a/tests/Predis/Command/KeyDeleteTest.php +++ b/tests/Predis/Command/KeyDeleteTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-key diff --git a/tests/Predis/Command/KeyDumpTest.php b/tests/Predis/Command/KeyDumpTest.php index edc885e0..9e11f3b3 100644 --- a/tests/Predis/Command/KeyDumpTest.php +++ b/tests/Predis/Command/KeyDumpTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-key diff --git a/tests/Predis/Command/KeyExistsTest.php b/tests/Predis/Command/KeyExistsTest.php index 95dc9aa4..5ab6fef3 100644 --- a/tests/Predis/Command/KeyExistsTest.php +++ b/tests/Predis/Command/KeyExistsTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-key diff --git a/tests/Predis/Command/KeyExpireAtTest.php b/tests/Predis/Command/KeyExpireAtTest.php index 45d05bc2..a2c91d89 100644 --- a/tests/Predis/Command/KeyExpireAtTest.php +++ b/tests/Predis/Command/KeyExpireAtTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-key diff --git a/tests/Predis/Command/KeyExpireTest.php b/tests/Predis/Command/KeyExpireTest.php index 69403eef..d7f905fe 100644 --- a/tests/Predis/Command/KeyExpireTest.php +++ b/tests/Predis/Command/KeyExpireTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-key diff --git a/tests/Predis/Command/KeyKeysTest.php b/tests/Predis/Command/KeyKeysTest.php index 89586d92..495b562e 100644 --- a/tests/Predis/Command/KeyKeysTest.php +++ b/tests/Predis/Command/KeyKeysTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-key diff --git a/tests/Predis/Command/KeyKeysV12xTest.php b/tests/Predis/Command/KeyKeysV12xTest.php index 41681364..a519db19 100644 --- a/tests/Predis/Command/KeyKeysV12xTest.php +++ b/tests/Predis/Command/KeyKeysV12xTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * We only perform disconnected tests for this commands because * it is too old (Redis v1.2) and expects a different response diff --git a/tests/Predis/Command/KeyMoveTest.php b/tests/Predis/Command/KeyMoveTest.php index 73666639..aa9b1bea 100644 --- a/tests/Predis/Command/KeyMoveTest.php +++ b/tests/Predis/Command/KeyMoveTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-key diff --git a/tests/Predis/Command/KeyPersistTest.php b/tests/Predis/Command/KeyPersistTest.php index 2b29274e..61b91b54 100644 --- a/tests/Predis/Command/KeyPersistTest.php +++ b/tests/Predis/Command/KeyPersistTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-key diff --git a/tests/Predis/Command/KeyPreciseExpireAtTest.php b/tests/Predis/Command/KeyPreciseExpireAtTest.php index c00c2efc..970ed8be 100644 --- a/tests/Predis/Command/KeyPreciseExpireAtTest.php +++ b/tests/Predis/Command/KeyPreciseExpireAtTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-key diff --git a/tests/Predis/Command/KeyPreciseExpireTest.php b/tests/Predis/Command/KeyPreciseExpireTest.php index e6e42670..69e2eb3b 100644 --- a/tests/Predis/Command/KeyPreciseExpireTest.php +++ b/tests/Predis/Command/KeyPreciseExpireTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-key diff --git a/tests/Predis/Command/KeyPreciseTimeToLiveTest.php b/tests/Predis/Command/KeyPreciseTimeToLiveTest.php index a5cc1c02..dbb188ba 100644 --- a/tests/Predis/Command/KeyPreciseTimeToLiveTest.php +++ b/tests/Predis/Command/KeyPreciseTimeToLiveTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-key diff --git a/tests/Predis/Command/KeyRandomTest.php b/tests/Predis/Command/KeyRandomTest.php index 64cb291b..e8d33fa5 100644 --- a/tests/Predis/Command/KeyRandomTest.php +++ b/tests/Predis/Command/KeyRandomTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-key diff --git a/tests/Predis/Command/KeyRenamePreserveTest.php b/tests/Predis/Command/KeyRenamePreserveTest.php index d0e42f7b..3d3e25c9 100644 --- a/tests/Predis/Command/KeyRenamePreserveTest.php +++ b/tests/Predis/Command/KeyRenamePreserveTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-key diff --git a/tests/Predis/Command/KeyRenameTest.php b/tests/Predis/Command/KeyRenameTest.php index e40caa99..23cc1c17 100644 --- a/tests/Predis/Command/KeyRenameTest.php +++ b/tests/Predis/Command/KeyRenameTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-key diff --git a/tests/Predis/Command/KeyRestoreTest.php b/tests/Predis/Command/KeyRestoreTest.php index 76378e99..4b674e08 100644 --- a/tests/Predis/Command/KeyRestoreTest.php +++ b/tests/Predis/Command/KeyRestoreTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-key diff --git a/tests/Predis/Command/KeyScanTest.php b/tests/Predis/Command/KeyScanTest.php index 31c4da78..c6104830 100644 --- a/tests/Predis/Command/KeyScanTest.php +++ b/tests/Predis/Command/KeyScanTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-key diff --git a/tests/Predis/Command/KeySortTest.php b/tests/Predis/Command/KeySortTest.php index c8aa9a42..69906005 100644 --- a/tests/Predis/Command/KeySortTest.php +++ b/tests/Predis/Command/KeySortTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-key diff --git a/tests/Predis/Command/KeyTimeToLiveTest.php b/tests/Predis/Command/KeyTimeToLiveTest.php index b643f9ad..912b7b69 100644 --- a/tests/Predis/Command/KeyTimeToLiveTest.php +++ b/tests/Predis/Command/KeyTimeToLiveTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-key diff --git a/tests/Predis/Command/KeyTypeTest.php b/tests/Predis/Command/KeyTypeTest.php index 65acf313..42b0688b 100644 --- a/tests/Predis/Command/KeyTypeTest.php +++ b/tests/Predis/Command/KeyTypeTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-key diff --git a/tests/Predis/Command/ListIndexTest.php b/tests/Predis/Command/ListIndexTest.php index f4861d04..f5d54440 100644 --- a/tests/Predis/Command/ListIndexTest.php +++ b/tests/Predis/Command/ListIndexTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-list diff --git a/tests/Predis/Command/ListInsertTest.php b/tests/Predis/Command/ListInsertTest.php index adb3fb68..42207b7f 100644 --- a/tests/Predis/Command/ListInsertTest.php +++ b/tests/Predis/Command/ListInsertTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-list diff --git a/tests/Predis/Command/ListLengthTest.php b/tests/Predis/Command/ListLengthTest.php index a7eac3cc..d0a308fc 100644 --- a/tests/Predis/Command/ListLengthTest.php +++ b/tests/Predis/Command/ListLengthTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-list diff --git a/tests/Predis/Command/ListPopFirstBlockingTest.php b/tests/Predis/Command/ListPopFirstBlockingTest.php index a1cbdaf1..02d787e0 100644 --- a/tests/Predis/Command/ListPopFirstBlockingTest.php +++ b/tests/Predis/Command/ListPopFirstBlockingTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-list diff --git a/tests/Predis/Command/ListPopFirstTest.php b/tests/Predis/Command/ListPopFirstTest.php index da1851c9..b74a7cf4 100644 --- a/tests/Predis/Command/ListPopFirstTest.php +++ b/tests/Predis/Command/ListPopFirstTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-list diff --git a/tests/Predis/Command/ListPopLastBlockingTest.php b/tests/Predis/Command/ListPopLastBlockingTest.php index 8deb113c..6457ffc1 100644 --- a/tests/Predis/Command/ListPopLastBlockingTest.php +++ b/tests/Predis/Command/ListPopLastBlockingTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-list diff --git a/tests/Predis/Command/ListPopLastPushHeadBlockingTest.php b/tests/Predis/Command/ListPopLastPushHeadBlockingTest.php index cd71f1ac..0a5666c4 100644 --- a/tests/Predis/Command/ListPopLastPushHeadBlockingTest.php +++ b/tests/Predis/Command/ListPopLastPushHeadBlockingTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-list diff --git a/tests/Predis/Command/ListPopLastPushHeadTest.php b/tests/Predis/Command/ListPopLastPushHeadTest.php index 7b5726a9..b87a7791 100644 --- a/tests/Predis/Command/ListPopLastPushHeadTest.php +++ b/tests/Predis/Command/ListPopLastPushHeadTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-list diff --git a/tests/Predis/Command/ListPopLastTest.php b/tests/Predis/Command/ListPopLastTest.php index e73148be..fd933145 100644 --- a/tests/Predis/Command/ListPopLastTest.php +++ b/tests/Predis/Command/ListPopLastTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-list diff --git a/tests/Predis/Command/ListPushHeadTest.php b/tests/Predis/Command/ListPushHeadTest.php index 040d263b..6b42db4d 100644 --- a/tests/Predis/Command/ListPushHeadTest.php +++ b/tests/Predis/Command/ListPushHeadTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-list diff --git a/tests/Predis/Command/ListPushHeadXTest.php b/tests/Predis/Command/ListPushHeadXTest.php index 03a9d170..d8c4d4dd 100644 --- a/tests/Predis/Command/ListPushHeadXTest.php +++ b/tests/Predis/Command/ListPushHeadXTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-list diff --git a/tests/Predis/Command/ListPushTailTest.php b/tests/Predis/Command/ListPushTailTest.php index cb7a21fe..2b7208f9 100644 --- a/tests/Predis/Command/ListPushTailTest.php +++ b/tests/Predis/Command/ListPushTailTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-list diff --git a/tests/Predis/Command/ListPushTailXTest.php b/tests/Predis/Command/ListPushTailXTest.php index 339528bf..395d029e 100644 --- a/tests/Predis/Command/ListPushTailXTest.php +++ b/tests/Predis/Command/ListPushTailXTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-list diff --git a/tests/Predis/Command/ListRangeTest.php b/tests/Predis/Command/ListRangeTest.php index 52a1629f..8a597935 100644 --- a/tests/Predis/Command/ListRangeTest.php +++ b/tests/Predis/Command/ListRangeTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-list diff --git a/tests/Predis/Command/ListRemoveTest.php b/tests/Predis/Command/ListRemoveTest.php index 01903ceb..985a4bd7 100644 --- a/tests/Predis/Command/ListRemoveTest.php +++ b/tests/Predis/Command/ListRemoveTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-list diff --git a/tests/Predis/Command/ListSetTest.php b/tests/Predis/Command/ListSetTest.php index fbf1272d..e8f51975 100644 --- a/tests/Predis/Command/ListSetTest.php +++ b/tests/Predis/Command/ListSetTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-list diff --git a/tests/Predis/Command/ListTrimTest.php b/tests/Predis/Command/ListTrimTest.php index eb0c0848..9abd2632 100644 --- a/tests/Predis/Command/ListTrimTest.php +++ b/tests/Predis/Command/ListTrimTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-list diff --git a/tests/Predis/Command/Processor/KeyPrefixProcessorTest.php b/tests/Predis/Command/Processor/KeyPrefixProcessorTest.php index 6fd1c74b..94a870b4 100644 --- a/tests/Predis/Command/Processor/KeyPrefixProcessorTest.php +++ b/tests/Predis/Command/Processor/KeyPrefixProcessorTest.php @@ -12,13 +12,13 @@ namespace Predis\Command\Processor; use stdClass; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; use Predis\Command\RawCommand; /** * */ -class KeyPrefixProcessorTest extends StandardTestCase +class KeyPrefixProcessorTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Command/Processor/ProcessorChainTest.php b/tests/Predis/Command/Processor/ProcessorChainTest.php index 2000dd68..55264f5f 100644 --- a/tests/Predis/Command/Processor/ProcessorChainTest.php +++ b/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 diff --git a/tests/Predis/Command/PubSubPublishTest.php b/tests/Predis/Command/PubSubPublishTest.php index 45852790..57b79f51 100644 --- a/tests/Predis/Command/PubSubPublishTest.php +++ b/tests/Predis/Command/PubSubPublishTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-pubsub diff --git a/tests/Predis/Command/PubSubPubsubTest.php b/tests/Predis/Command/PubSubPubsubTest.php index bf1ed324..213fb330 100644 --- a/tests/Predis/Command/PubSubPubsubTest.php +++ b/tests/Predis/Command/PubSubPubsubTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-pubsub diff --git a/tests/Predis/Command/PubSubSubscribeByPatternTest.php b/tests/Predis/Command/PubSubSubscribeByPatternTest.php index 8f3a3978..e87e8a2c 100644 --- a/tests/Predis/Command/PubSubSubscribeByPatternTest.php +++ b/tests/Predis/Command/PubSubSubscribeByPatternTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-pubsub diff --git a/tests/Predis/Command/PubSubSubscribeTest.php b/tests/Predis/Command/PubSubSubscribeTest.php index 6872b510..9e41131d 100644 --- a/tests/Predis/Command/PubSubSubscribeTest.php +++ b/tests/Predis/Command/PubSubSubscribeTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-pubsub diff --git a/tests/Predis/Command/PubSubUnsubscribeByPatternTest.php b/tests/Predis/Command/PubSubUnsubscribeByPatternTest.php index 001e1519..18f6cc30 100644 --- a/tests/Predis/Command/PubSubUnsubscribeByPatternTest.php +++ b/tests/Predis/Command/PubSubUnsubscribeByPatternTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-pubsub diff --git a/tests/Predis/Command/PubSubUnsubscribeTest.php b/tests/Predis/Command/PubSubUnsubscribeTest.php index 10fbe8dc..5132f3bd 100644 --- a/tests/Predis/Command/PubSubUnsubscribeTest.php +++ b/tests/Predis/Command/PubSubUnsubscribeTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-pubsub diff --git a/tests/Predis/Command/RawCommandTest.php b/tests/Predis/Command/RawCommandTest.php index 9c683ef6..f16df67e 100644 --- a/tests/Predis/Command/RawCommandTest.php +++ b/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 diff --git a/tests/Predis/Command/ScriptedCommandTest.php b/tests/Predis/Command/ScriptCommandTest.php similarity index 98% rename from tests/Predis/Command/ScriptedCommandTest.php rename to tests/Predis/Command/ScriptCommandTest.php index 540729f8..afeda493 100644 --- a/tests/Predis/Command/ScriptedCommandTest.php +++ b/tests/Predis/Command/ScriptCommandTest.php @@ -11,12 +11,12 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * @group realm-scripting */ -class ScriptCommandTest extends StandardTestCase +class ScriptCommandTest extends PredisTestCase { const LUA_SCRIPT = 'return { KEYS[1], KEYS[2], ARGV[1], ARGV[2] }'; const LUA_SCRIPT_SHA1 = '6e07f61f502e36d123fe28523076af588f5c315e'; diff --git a/tests/Predis/Command/ServerBackgroundRewriteAOFTest.php b/tests/Predis/Command/ServerBackgroundRewriteAOFTest.php index 84d6cb03..4e03b935 100644 --- a/tests/Predis/Command/ServerBackgroundRewriteAOFTest.php +++ b/tests/Predis/Command/ServerBackgroundRewriteAOFTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-server diff --git a/tests/Predis/Command/ServerBackgroundSaveTest.php b/tests/Predis/Command/ServerBackgroundSaveTest.php index c79148a1..e275563a 100644 --- a/tests/Predis/Command/ServerBackgroundSaveTest.php +++ b/tests/Predis/Command/ServerBackgroundSaveTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-server diff --git a/tests/Predis/Command/ServerClientTest.php b/tests/Predis/Command/ServerClientTest.php index 214bfca4..c23c11eb 100644 --- a/tests/Predis/Command/ServerClientTest.php +++ b/tests/Predis/Command/ServerClientTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-server diff --git a/tests/Predis/Command/ServerConfigTest.php b/tests/Predis/Command/ServerConfigTest.php index 45422e1c..8fb29c24 100644 --- a/tests/Predis/Command/ServerConfigTest.php +++ b/tests/Predis/Command/ServerConfigTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-server diff --git a/tests/Predis/Command/ServerDatabaseSizeTest.php b/tests/Predis/Command/ServerDatabaseSizeTest.php index d280a2e0..9cfc3803 100644 --- a/tests/Predis/Command/ServerDatabaseSizeTest.php +++ b/tests/Predis/Command/ServerDatabaseSizeTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-server diff --git a/tests/Predis/Command/ServerEvalSHATest.php b/tests/Predis/Command/ServerEvalSHATest.php index cb0df638..2446ca57 100644 --- a/tests/Predis/Command/ServerEvalSHATest.php +++ b/tests/Predis/Command/ServerEvalSHATest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-scripting diff --git a/tests/Predis/Command/ServerEvalTest.php b/tests/Predis/Command/ServerEvalTest.php index 15ca18a9..ae8d7765 100644 --- a/tests/Predis/Command/ServerEvalTest.php +++ b/tests/Predis/Command/ServerEvalTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-scripting diff --git a/tests/Predis/Command/ServerFlushAllTest.php b/tests/Predis/Command/ServerFlushAllTest.php index 797c1530..b455f4dc 100644 --- a/tests/Predis/Command/ServerFlushAllTest.php +++ b/tests/Predis/Command/ServerFlushAllTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-server diff --git a/tests/Predis/Command/ServerFlushDatabaseTest.php b/tests/Predis/Command/ServerFlushDatabaseTest.php index 8cf95d00..888d041e 100644 --- a/tests/Predis/Command/ServerFlushDatabaseTest.php +++ b/tests/Predis/Command/ServerFlushDatabaseTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-server diff --git a/tests/Predis/Command/ServerInfoTest.php b/tests/Predis/Command/ServerInfoTest.php index 1afd1622..74cf2de1 100644 --- a/tests/Predis/Command/ServerInfoTest.php +++ b/tests/Predis/Command/ServerInfoTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-server diff --git a/tests/Predis/Command/ServerInfoV26xTest.php b/tests/Predis/Command/ServerInfoV26xTest.php index edeb56a5..4264445d 100644 --- a/tests/Predis/Command/ServerInfoV26xTest.php +++ b/tests/Predis/Command/ServerInfoV26xTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-server diff --git a/tests/Predis/Command/ServerLastSaveTest.php b/tests/Predis/Command/ServerLastSaveTest.php index 2fddf4fa..47a7f7b6 100644 --- a/tests/Predis/Command/ServerLastSaveTest.php +++ b/tests/Predis/Command/ServerLastSaveTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-server diff --git a/tests/Predis/Command/ServerMonitorTest.php b/tests/Predis/Command/ServerMonitorTest.php index 73216734..5fa5ab69 100644 --- a/tests/Predis/Command/ServerMonitorTest.php +++ b/tests/Predis/Command/ServerMonitorTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-server diff --git a/tests/Predis/Command/ServerObjectTest.php b/tests/Predis/Command/ServerObjectTest.php index 6b9ac78b..7457ead7 100644 --- a/tests/Predis/Command/ServerObjectTest.php +++ b/tests/Predis/Command/ServerObjectTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-server diff --git a/tests/Predis/Command/ServerSaveTest.php b/tests/Predis/Command/ServerSaveTest.php index 91d2829b..9e923f8c 100644 --- a/tests/Predis/Command/ServerSaveTest.php +++ b/tests/Predis/Command/ServerSaveTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-server diff --git a/tests/Predis/Command/ServerScriptTest.php b/tests/Predis/Command/ServerScriptTest.php index 6fe76bcd..0b8b839a 100644 --- a/tests/Predis/Command/ServerScriptTest.php +++ b/tests/Predis/Command/ServerScriptTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-scripting diff --git a/tests/Predis/Command/ServerSentinelTest.php b/tests/Predis/Command/ServerSentinelTest.php index c545a3e9..ea81da14 100644 --- a/tests/Predis/Command/ServerSentinelTest.php +++ b/tests/Predis/Command/ServerSentinelTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-server diff --git a/tests/Predis/Command/ServerShutdownTest.php b/tests/Predis/Command/ServerShutdownTest.php index a3ff0695..3accd559 100644 --- a/tests/Predis/Command/ServerShutdownTest.php +++ b/tests/Predis/Command/ServerShutdownTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-server diff --git a/tests/Predis/Command/ServerSlaveOfTest.php b/tests/Predis/Command/ServerSlaveOfTest.php index 21aee3d8..a132540d 100644 --- a/tests/Predis/Command/ServerSlaveOfTest.php +++ b/tests/Predis/Command/ServerSlaveOfTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-server diff --git a/tests/Predis/Command/ServerSlowlogTest.php b/tests/Predis/Command/ServerSlowlogTest.php index c4eb3580..abfb5270 100644 --- a/tests/Predis/Command/ServerSlowlogTest.php +++ b/tests/Predis/Command/ServerSlowlogTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * In order to support the output of SLOWLOG, the backend connection * must be able to parse nested multibulk replies deeper than 2 levels. diff --git a/tests/Predis/Command/ServerTimeTest.php b/tests/Predis/Command/ServerTimeTest.php index 63b39fb2..492fd94d 100644 --- a/tests/Predis/Command/ServerTimeTest.php +++ b/tests/Predis/Command/ServerTimeTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-server diff --git a/tests/Predis/Command/SetAddTest.php b/tests/Predis/Command/SetAddTest.php index da0b746d..9131e480 100644 --- a/tests/Predis/Command/SetAddTest.php +++ b/tests/Predis/Command/SetAddTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-set diff --git a/tests/Predis/Command/SetCardinalityTest.php b/tests/Predis/Command/SetCardinalityTest.php index b4f03f0c..c0bf2da0 100644 --- a/tests/Predis/Command/SetCardinalityTest.php +++ b/tests/Predis/Command/SetCardinalityTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-set diff --git a/tests/Predis/Command/SetDifferenceStoreTest.php b/tests/Predis/Command/SetDifferenceStoreTest.php index 648d7a28..7682e6fe 100644 --- a/tests/Predis/Command/SetDifferenceStoreTest.php +++ b/tests/Predis/Command/SetDifferenceStoreTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-set diff --git a/tests/Predis/Command/SetDifferenceTest.php b/tests/Predis/Command/SetDifferenceTest.php index 95a17185..a9bfc228 100644 --- a/tests/Predis/Command/SetDifferenceTest.php +++ b/tests/Predis/Command/SetDifferenceTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-set diff --git a/tests/Predis/Command/SetIntersectionStoreTest.php b/tests/Predis/Command/SetIntersectionStoreTest.php index 06eb6f77..0ee5e15d 100644 --- a/tests/Predis/Command/SetIntersectionStoreTest.php +++ b/tests/Predis/Command/SetIntersectionStoreTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-set diff --git a/tests/Predis/Command/SetIntersectionTest.php b/tests/Predis/Command/SetIntersectionTest.php index 9f6deaad..08eee08a 100644 --- a/tests/Predis/Command/SetIntersectionTest.php +++ b/tests/Predis/Command/SetIntersectionTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-set diff --git a/tests/Predis/Command/SetIsMemberTest.php b/tests/Predis/Command/SetIsMemberTest.php index 2c13f002..ed0f4d8d 100644 --- a/tests/Predis/Command/SetIsMemberTest.php +++ b/tests/Predis/Command/SetIsMemberTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-set diff --git a/tests/Predis/Command/SetMembersTest.php b/tests/Predis/Command/SetMembersTest.php index 576b3dd2..cb1d86ed 100644 --- a/tests/Predis/Command/SetMembersTest.php +++ b/tests/Predis/Command/SetMembersTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-set diff --git a/tests/Predis/Command/SetMoveTest.php b/tests/Predis/Command/SetMoveTest.php index 56de8068..e4378c7a 100644 --- a/tests/Predis/Command/SetMoveTest.php +++ b/tests/Predis/Command/SetMoveTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-set diff --git a/tests/Predis/Command/SetPopTest.php b/tests/Predis/Command/SetPopTest.php index f02f8813..96b042e5 100644 --- a/tests/Predis/Command/SetPopTest.php +++ b/tests/Predis/Command/SetPopTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-set diff --git a/tests/Predis/Command/SetRandomMemberTest.php b/tests/Predis/Command/SetRandomMemberTest.php index d771ae2d..e92af103 100644 --- a/tests/Predis/Command/SetRandomMemberTest.php +++ b/tests/Predis/Command/SetRandomMemberTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-set diff --git a/tests/Predis/Command/SetRemoveTest.php b/tests/Predis/Command/SetRemoveTest.php index 33c384c7..0a5ae1db 100644 --- a/tests/Predis/Command/SetRemoveTest.php +++ b/tests/Predis/Command/SetRemoveTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-set diff --git a/tests/Predis/Command/SetScanTest.php b/tests/Predis/Command/SetScanTest.php index 51903b56..457a05aa 100644 --- a/tests/Predis/Command/SetScanTest.php +++ b/tests/Predis/Command/SetScanTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-set diff --git a/tests/Predis/Command/SetUnionStoreTest.php b/tests/Predis/Command/SetUnionStoreTest.php index 154eefb3..b55d03c2 100644 --- a/tests/Predis/Command/SetUnionStoreTest.php +++ b/tests/Predis/Command/SetUnionStoreTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-set diff --git a/tests/Predis/Command/SetUnionTest.php b/tests/Predis/Command/SetUnionTest.php index cad58cfc..aa4b3f0e 100644 --- a/tests/Predis/Command/SetUnionTest.php +++ b/tests/Predis/Command/SetUnionTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-set diff --git a/tests/Predis/Command/StringAppendTest.php b/tests/Predis/Command/StringAppendTest.php index d360de35..c0c3739e 100644 --- a/tests/Predis/Command/StringAppendTest.php +++ b/tests/Predis/Command/StringAppendTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringBitCountTest.php b/tests/Predis/Command/StringBitCountTest.php index 84d8902a..ddda1e87 100644 --- a/tests/Predis/Command/StringBitCountTest.php +++ b/tests/Predis/Command/StringBitCountTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringBitOpTest.php b/tests/Predis/Command/StringBitOpTest.php index 489183cf..faf6f896 100644 --- a/tests/Predis/Command/StringBitOpTest.php +++ b/tests/Predis/Command/StringBitOpTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringDecrementByTest.php b/tests/Predis/Command/StringDecrementByTest.php index ddbfff60..e21905b7 100644 --- a/tests/Predis/Command/StringDecrementByTest.php +++ b/tests/Predis/Command/StringDecrementByTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringDecrementTest.php b/tests/Predis/Command/StringDecrementTest.php index f8585aa6..8e6981d6 100644 --- a/tests/Predis/Command/StringDecrementTest.php +++ b/tests/Predis/Command/StringDecrementTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringGetBitTest.php b/tests/Predis/Command/StringGetBitTest.php index 649b7b0e..c0dcfa0c 100644 --- a/tests/Predis/Command/StringGetBitTest.php +++ b/tests/Predis/Command/StringGetBitTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringGetMultipleTest.php b/tests/Predis/Command/StringGetMultipleTest.php index 2712d3c9..81913f22 100644 --- a/tests/Predis/Command/StringGetMultipleTest.php +++ b/tests/Predis/Command/StringGetMultipleTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringGetRangeTest.php b/tests/Predis/Command/StringGetRangeTest.php index e97d6623..697ad338 100644 --- a/tests/Predis/Command/StringGetRangeTest.php +++ b/tests/Predis/Command/StringGetRangeTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringGetSetTest.php b/tests/Predis/Command/StringGetSetTest.php index 9753c517..b98a946c 100644 --- a/tests/Predis/Command/StringGetSetTest.php +++ b/tests/Predis/Command/StringGetSetTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringGetTest.php b/tests/Predis/Command/StringGetTest.php index 70bcfe70..38f5cffa 100644 --- a/tests/Predis/Command/StringGetTest.php +++ b/tests/Predis/Command/StringGetTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringIncrementByFloatTest.php b/tests/Predis/Command/StringIncrementByFloatTest.php index 3f084611..427ba311 100644 --- a/tests/Predis/Command/StringIncrementByFloatTest.php +++ b/tests/Predis/Command/StringIncrementByFloatTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringIncrementByTest.php b/tests/Predis/Command/StringIncrementByTest.php index c34baeba..320c5ebc 100644 --- a/tests/Predis/Command/StringIncrementByTest.php +++ b/tests/Predis/Command/StringIncrementByTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringIncrementTest.php b/tests/Predis/Command/StringIncrementTest.php index 56e95053..682cd75f 100644 --- a/tests/Predis/Command/StringIncrementTest.php +++ b/tests/Predis/Command/StringIncrementTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringPreciseSetExpireTest.php b/tests/Predis/Command/StringPreciseSetExpireTest.php index d52662be..d6c52752 100644 --- a/tests/Predis/Command/StringPreciseSetExpireTest.php +++ b/tests/Predis/Command/StringPreciseSetExpireTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringSetBitTest.php b/tests/Predis/Command/StringSetBitTest.php index 0d4db879..0cde85a2 100644 --- a/tests/Predis/Command/StringSetBitTest.php +++ b/tests/Predis/Command/StringSetBitTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringSetExpireTest.php b/tests/Predis/Command/StringSetExpireTest.php index 347d2a98..63fac431 100644 --- a/tests/Predis/Command/StringSetExpireTest.php +++ b/tests/Predis/Command/StringSetExpireTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringSetMultiplePreserveTest.php b/tests/Predis/Command/StringSetMultiplePreserveTest.php index d768527f..31851d4f 100644 --- a/tests/Predis/Command/StringSetMultiplePreserveTest.php +++ b/tests/Predis/Command/StringSetMultiplePreserveTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringSetMultipleTest.php b/tests/Predis/Command/StringSetMultipleTest.php index b720ee76..b4cd235b 100644 --- a/tests/Predis/Command/StringSetMultipleTest.php +++ b/tests/Predis/Command/StringSetMultipleTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringSetPreserveTest.php b/tests/Predis/Command/StringSetPreserveTest.php index 72aa5974..d83a8d2e 100644 --- a/tests/Predis/Command/StringSetPreserveTest.php +++ b/tests/Predis/Command/StringSetPreserveTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringSetRangeTest.php b/tests/Predis/Command/StringSetRangeTest.php index a824db10..32da0f47 100644 --- a/tests/Predis/Command/StringSetRangeTest.php +++ b/tests/Predis/Command/StringSetRangeTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringSetTest.php b/tests/Predis/Command/StringSetTest.php index 8599c385..ea19d90b 100644 --- a/tests/Predis/Command/StringSetTest.php +++ b/tests/Predis/Command/StringSetTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringStrlenTest.php b/tests/Predis/Command/StringStrlenTest.php index 5763aa13..12e5447d 100644 --- a/tests/Predis/Command/StringStrlenTest.php +++ b/tests/Predis/Command/StringStrlenTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-string diff --git a/tests/Predis/Command/StringSubstrTest.php b/tests/Predis/Command/StringSubstrTest.php index 38157ae1..d92b2080 100644 --- a/tests/Predis/Command/StringSubstrTest.php +++ b/tests/Predis/Command/StringSubstrTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * SUBSTR is actually the old name of GETRANGE in version of Redis <= 2.0. * This command should be considered obsolete and we will perform any kind diff --git a/tests/Predis/Command/TransactionDiscardTest.php b/tests/Predis/Command/TransactionDiscardTest.php index e0dd9fc0..e614774b 100644 --- a/tests/Predis/Command/TransactionDiscardTest.php +++ b/tests/Predis/Command/TransactionDiscardTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-transaction diff --git a/tests/Predis/Command/TransactionExecTest.php b/tests/Predis/Command/TransactionExecTest.php index 12858147..dd165374 100644 --- a/tests/Predis/Command/TransactionExecTest.php +++ b/tests/Predis/Command/TransactionExecTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-transaction diff --git a/tests/Predis/Command/TransactionMultiTest.php b/tests/Predis/Command/TransactionMultiTest.php index 3aef9f52..ff2dac49 100644 --- a/tests/Predis/Command/TransactionMultiTest.php +++ b/tests/Predis/Command/TransactionMultiTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-transaction diff --git a/tests/Predis/Command/TransactionUnwatchTest.php b/tests/Predis/Command/TransactionUnwatchTest.php index 78348793..08c38eed 100644 --- a/tests/Predis/Command/TransactionUnwatchTest.php +++ b/tests/Predis/Command/TransactionUnwatchTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-transaction diff --git a/tests/Predis/Command/TransactionWatchTest.php b/tests/Predis/Command/TransactionWatchTest.php index eebde3a7..45673f13 100644 --- a/tests/Predis/Command/TransactionWatchTest.php +++ b/tests/Predis/Command/TransactionWatchTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-transaction diff --git a/tests/Predis/Command/ZSetAddTest.php b/tests/Predis/Command/ZSetAddTest.php index d3166ad1..f35aa025 100644 --- a/tests/Predis/Command/ZSetAddTest.php +++ b/tests/Predis/Command/ZSetAddTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-zset diff --git a/tests/Predis/Command/ZSetCardinalityTest.php b/tests/Predis/Command/ZSetCardinalityTest.php index a749afb1..0ce8bd2d 100644 --- a/tests/Predis/Command/ZSetCardinalityTest.php +++ b/tests/Predis/Command/ZSetCardinalityTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-zset diff --git a/tests/Predis/Command/ZSetCountTest.php b/tests/Predis/Command/ZSetCountTest.php index b5fcd659..556a3705 100644 --- a/tests/Predis/Command/ZSetCountTest.php +++ b/tests/Predis/Command/ZSetCountTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-zset diff --git a/tests/Predis/Command/ZSetIncrementByTest.php b/tests/Predis/Command/ZSetIncrementByTest.php index cd7bedb7..3ad420fa 100644 --- a/tests/Predis/Command/ZSetIncrementByTest.php +++ b/tests/Predis/Command/ZSetIncrementByTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-zset diff --git a/tests/Predis/Command/ZSetIntersectionStoreTest.php b/tests/Predis/Command/ZSetIntersectionStoreTest.php index 369d12cf..9c799d84 100644 --- a/tests/Predis/Command/ZSetIntersectionStoreTest.php +++ b/tests/Predis/Command/ZSetIntersectionStoreTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-zset diff --git a/tests/Predis/Command/ZSetRangeByScoreTest.php b/tests/Predis/Command/ZSetRangeByScoreTest.php index a7a8ebce..9964e0a6 100644 --- a/tests/Predis/Command/ZSetRangeByScoreTest.php +++ b/tests/Predis/Command/ZSetRangeByScoreTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-zset diff --git a/tests/Predis/Command/ZSetRangeTest.php b/tests/Predis/Command/ZSetRangeTest.php index 857d9cbd..3cdaa09e 100644 --- a/tests/Predis/Command/ZSetRangeTest.php +++ b/tests/Predis/Command/ZSetRangeTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-zset diff --git a/tests/Predis/Command/ZSetRankTest.php b/tests/Predis/Command/ZSetRankTest.php index 36a1b88c..c286e199 100644 --- a/tests/Predis/Command/ZSetRankTest.php +++ b/tests/Predis/Command/ZSetRankTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-zset diff --git a/tests/Predis/Command/ZSetRemoveRangeByRankTest.php b/tests/Predis/Command/ZSetRemoveRangeByRankTest.php index bfc5509a..0aa46344 100644 --- a/tests/Predis/Command/ZSetRemoveRangeByRankTest.php +++ b/tests/Predis/Command/ZSetRemoveRangeByRankTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-zset diff --git a/tests/Predis/Command/ZSetRemoveRangeByScoreTest.php b/tests/Predis/Command/ZSetRemoveRangeByScoreTest.php index f272ad01..80bf0709 100644 --- a/tests/Predis/Command/ZSetRemoveRangeByScoreTest.php +++ b/tests/Predis/Command/ZSetRemoveRangeByScoreTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-zset diff --git a/tests/Predis/Command/ZSetRemoveTest.php b/tests/Predis/Command/ZSetRemoveTest.php index 3c5650c4..514e78ae 100644 --- a/tests/Predis/Command/ZSetRemoveTest.php +++ b/tests/Predis/Command/ZSetRemoveTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-zset diff --git a/tests/Predis/Command/ZSetReverseRangeByScoreTest.php b/tests/Predis/Command/ZSetReverseRangeByScoreTest.php index c4078544..3b87daae 100644 --- a/tests/Predis/Command/ZSetReverseRangeByScoreTest.php +++ b/tests/Predis/Command/ZSetReverseRangeByScoreTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-zset diff --git a/tests/Predis/Command/ZSetReverseRangeTest.php b/tests/Predis/Command/ZSetReverseRangeTest.php index b2a08344..44d044ff 100644 --- a/tests/Predis/Command/ZSetReverseRangeTest.php +++ b/tests/Predis/Command/ZSetReverseRangeTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-zset diff --git a/tests/Predis/Command/ZSetReverseRankTest.php b/tests/Predis/Command/ZSetReverseRankTest.php index 489a2f10..0e33224b 100644 --- a/tests/Predis/Command/ZSetReverseRankTest.php +++ b/tests/Predis/Command/ZSetReverseRankTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-zset diff --git a/tests/Predis/Command/ZSetScanTest.php b/tests/Predis/Command/ZSetScanTest.php index 95077110..17f5cd7b 100644 --- a/tests/Predis/Command/ZSetScanTest.php +++ b/tests/Predis/Command/ZSetScanTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-zset diff --git a/tests/Predis/Command/ZSetScoreTest.php b/tests/Predis/Command/ZSetScoreTest.php index cffc9f46..0c572f33 100644 --- a/tests/Predis/Command/ZSetScoreTest.php +++ b/tests/Predis/Command/ZSetScoreTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-zset diff --git a/tests/Predis/Command/ZSetUnionStoreTest.php b/tests/Predis/Command/ZSetUnionStoreTest.php index d4210773..1b9bf80a 100644 --- a/tests/Predis/Command/ZSetUnionStoreTest.php +++ b/tests/Predis/Command/ZSetUnionStoreTest.php @@ -11,8 +11,6 @@ namespace Predis\Command; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group commands * @group realm-zset diff --git a/tests/Predis/CommunicationExceptionTest.php b/tests/Predis/CommunicationExceptionTest.php index f766815d..76f4d02e 100644 --- a/tests/Predis/CommunicationExceptionTest.php +++ b/tests/Predis/CommunicationExceptionTest.php @@ -11,14 +11,13 @@ namespace Predis; -use PHPUnit_Framework_TestCase as StandardTestCase; - +use PredisTestCase; use Predis\Connection\SingleConnectionInterface; /** * */ -class CommunicationExceptionTest extends StandardTestCase +class CommunicationExceptionTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Configuration/ClusterOptionTest.php b/tests/Predis/Configuration/ClusterOptionTest.php index 8b090c95..2a7f95c0 100644 --- a/tests/Predis/Configuration/ClusterOptionTest.php +++ b/tests/Predis/Configuration/ClusterOptionTest.php @@ -11,13 +11,13 @@ namespace Predis\Configuration; -use PHPUnit_Framework_TestCase as StandardTestCase; use stdClass; +use PredisTestCase; /** * */ -class ClusterOptionTest extends StandardTestCase +class ClusterOptionTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Configuration/ConnectionFactoryOptionTest.php b/tests/Predis/Configuration/ConnectionFactoryOptionTest.php index 4e9958d7..e4b2200e 100644 --- a/tests/Predis/Configuration/ConnectionFactoryOptionTest.php +++ b/tests/Predis/Configuration/ConnectionFactoryOptionTest.php @@ -12,15 +12,14 @@ namespace Predis\Configuration; use InvalidArgumentException; -use PHPUnit_Framework_TestCase as StandardTestCase; use stdClass; - +use PredisTestCase; use Predis\Connection\ConnectionFactory; /** * */ -class ConnectionFactoryOptionTest extends StandardTestCase +class ConnectionFactoryOptionTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Configuration/ExceptionsOptionTest.php b/tests/Predis/Configuration/ExceptionsOptionTest.php index 60fd977d..cb13feb7 100644 --- a/tests/Predis/Configuration/ExceptionsOptionTest.php +++ b/tests/Predis/Configuration/ExceptionsOptionTest.php @@ -11,13 +11,13 @@ namespace Predis\Configuration; -use PHPUnit_Framework_TestCase as StandardTestCase; use stdClass; +use PredisTestCase; /** * */ -class ExceptionsOptionTest extends StandardTestCase +class ExceptionsOptionTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Configuration/OptionsTest.php b/tests/Predis/Configuration/OptionsTest.php index 69628fea..34751c35 100644 --- a/tests/Predis/Configuration/OptionsTest.php +++ b/tests/Predis/Configuration/OptionsTest.php @@ -11,14 +11,14 @@ namespace Predis\Configuration; -use PHPUnit_Framework_TestCase as StandardTestCase; use stdClass; +use PredisTestCase; /** * @todo We should test the inner work performed by this class * using mock objects, but it is quite hard to to that. */ -class OptionsTest extends StandardTestCase +class OptionsTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Configuration/PrefixOptionTest.php b/tests/Predis/Configuration/PrefixOptionTest.php index 71d64a60..c9f5ecb8 100644 --- a/tests/Predis/Configuration/PrefixOptionTest.php +++ b/tests/Predis/Configuration/PrefixOptionTest.php @@ -11,12 +11,12 @@ namespace Predis\Configuration; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * */ -class PrefixOptionTest extends StandardTestCase +class PrefixOptionTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Configuration/ProfileOptionTest.php b/tests/Predis/Configuration/ProfileOptionTest.php index 93078093..559287d6 100644 --- a/tests/Predis/Configuration/ProfileOptionTest.php +++ b/tests/Predis/Configuration/ProfileOptionTest.php @@ -12,16 +12,15 @@ namespace Predis\Configuration; use InvalidArgumentException; -use PHPUnit_Framework_TestCase as StandardTestCase; use stdClass; - +use PredisTestCase; use Predis\Command\Processor\KeyPrefixProcessor; use Predis\Profile; /** * */ -class ProfileOptionTest extends StandardTestCase +class ProfileOptionTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Configuration/ReplicationOptionTest.php b/tests/Predis/Configuration/ReplicationOptionTest.php index 1ebb2bb5..4115e972 100644 --- a/tests/Predis/Configuration/ReplicationOptionTest.php +++ b/tests/Predis/Configuration/ReplicationOptionTest.php @@ -11,12 +11,12 @@ namespace Predis\Configuration; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * */ -class ReplicationOptionTest extends StandardTestCase +class ReplicationOptionTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Connection/ComposableStreamConnectionTest.php b/tests/Predis/Connection/ComposableStreamConnectionTest.php index 114f6ee7..bd2d1aee 100644 --- a/tests/Predis/Connection/ComposableStreamConnectionTest.php +++ b/tests/Predis/Connection/ComposableStreamConnectionTest.php @@ -11,8 +11,6 @@ namespace Predis\Connection; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * */ diff --git a/tests/Predis/Connection/ConnectionFactoryTest.php b/tests/Predis/Connection/ConnectionFactoryTest.php index 891d69da..6e14d82d 100644 --- a/tests/Predis/Connection/ConnectionFactoryTest.php +++ b/tests/Predis/Connection/ConnectionFactoryTest.php @@ -11,12 +11,12 @@ namespace Predis\Connection; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * */ -class ConnectionFactoryTest extends StandardTestCase +class ConnectionFactoryTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Connection/ConnectionParametersTest.php b/tests/Predis/Connection/ConnectionParametersTest.php index 50c271fa..f9ec68db 100644 --- a/tests/Predis/Connection/ConnectionParametersTest.php +++ b/tests/Predis/Connection/ConnectionParametersTest.php @@ -11,13 +11,13 @@ namespace Predis\Connection; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * @todo ConnectionParameters::define(); * @todo ConnectionParameters::undefine(); */ -class ParametersTest extends StandardTestCase +class ParametersTest extends PredisTestCase { /** * @group disconnected @@ -220,18 +220,6 @@ class ParametersTest extends StandardTestCase ); } - /** - * 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. * diff --git a/tests/Predis/Connection/MasterSlaveReplicationTest.php b/tests/Predis/Connection/MasterSlaveReplicationTest.php index 57d5336b..d6f407f3 100644 --- a/tests/Predis/Connection/MasterSlaveReplicationTest.php +++ b/tests/Predis/Connection/MasterSlaveReplicationTest.php @@ -11,15 +11,14 @@ namespace Predis\Connection; -use PHPUnit_Framework_TestCase as StandardTestCase; - +use PredisTestCase; use Predis\Profile; use Predis\Replication\ReplicationStrategy; /** * */ -class MasterSlaveReplicationTest extends StandardTestCase +class MasterSlaveReplicationTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Connection/PhpiredisConnectionTest.php b/tests/Predis/Connection/PhpiredisConnectionTest.php index b4a715c1..5dc5f7db 100644 --- a/tests/Predis/Connection/PhpiredisConnectionTest.php +++ b/tests/Predis/Connection/PhpiredisConnectionTest.php @@ -11,8 +11,6 @@ namespace Predis\Connection; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group ext-phpiredis */ diff --git a/tests/Predis/Connection/PhpiredisStreamConnectionTest.php b/tests/Predis/Connection/PhpiredisStreamConnectionTest.php index 796bd22e..a22b001a 100644 --- a/tests/Predis/Connection/PhpiredisStreamConnectionTest.php +++ b/tests/Predis/Connection/PhpiredisStreamConnectionTest.php @@ -11,8 +11,6 @@ namespace Predis\Connection; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * @group ext-phpiredis */ diff --git a/tests/Predis/Connection/PredisClusterTest.php b/tests/Predis/Connection/PredisClusterTest.php index 99f4faba..bc834c9c 100644 --- a/tests/Predis/Connection/PredisClusterTest.php +++ b/tests/Predis/Connection/PredisClusterTest.php @@ -11,14 +11,13 @@ namespace Predis\Connection; -use PHPUnit_Framework_TestCase as StandardTestCase; - +use PredisTestCase; use Predis\Profile; /** * */ -class PredisClusterTest extends StandardTestCase +class PredisClusterTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Connection/RedisClusterTest.php b/tests/Predis/Connection/RedisClusterTest.php index 60251e2c..52c9ef4c 100644 --- a/tests/Predis/Connection/RedisClusterTest.php +++ b/tests/Predis/Connection/RedisClusterTest.php @@ -11,15 +11,14 @@ namespace Predis\Connection; -use PHPUnit_Framework_TestCase as StandardTestCase; - +use PredisTestCase; use Predis\Profile; use Predis\Response; /** * */ -class RedisClusterTest extends StandardTestCase +class RedisClusterTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Connection/StreamConnectionTest.php b/tests/Predis/Connection/StreamConnectionTest.php index d56440c5..577ef768 100644 --- a/tests/Predis/Connection/StreamConnectionTest.php +++ b/tests/Predis/Connection/StreamConnectionTest.php @@ -11,8 +11,6 @@ namespace Predis\Connection; -use PHPUnit_Framework_TestCase as StandardTestCase; - /** * */ diff --git a/tests/Predis/Connection/WebdisConnectionTest.php b/tests/Predis/Connection/WebdisConnectionTest.php index 793a70ed..2e07b417 100644 --- a/tests/Predis/Connection/WebdisConnectionTest.php +++ b/tests/Predis/Connection/WebdisConnectionTest.php @@ -11,8 +11,7 @@ namespace Predis\Connection; -use PHPUnit_Framework_TestCase as StandardTestCase; - +use PredisTestCase; use Predis\Profile; /** @@ -21,7 +20,7 @@ use Predis\Profile; * @group realm-connection * @group realm-webdis */ -class WebdisConnectionTest extends StandardTestCase +class WebdisConnectionTest extends PredisTestCase { /** * @group disconnected @@ -167,31 +166,6 @@ class WebdisConnectionTest 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 Profile\ProfileInterface - */ - protected function getProfile($version = null) - { - return Profile\Factory::get($version ?: REDIS_SERVER_VERSION); - } - /** * Returns a new instance of a connection instance. * diff --git a/tests/Predis/Monitor/ConsumerTest.php b/tests/Predis/Monitor/ConsumerTest.php index edd3c0f4..1b7751dd 100644 --- a/tests/Predis/Monitor/ConsumerTest.php +++ b/tests/Predis/Monitor/ConsumerTest.php @@ -11,8 +11,7 @@ namespace Predis\Monitor; -use PHPUnit_Framework_TestCase as StandardTestCase; - +use PredisTestCase; use Predis\Client; use Predis\Profile; use Predis\Monitor\Consumer as MonitorConsumer; @@ -20,7 +19,7 @@ use Predis\Monitor\Consumer as MonitorConsumer; /** * @group realm-monitor */ -class ConsumerTest extends StandardTestCase +class ConsumerTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Pipeline/AtomicTest.php b/tests/Predis/Pipeline/AtomicTest.php index 0418db72..6453bae9 100644 --- a/tests/Predis/Pipeline/AtomicTest.php +++ b/tests/Predis/Pipeline/AtomicTest.php @@ -11,8 +11,7 @@ namespace Predis\Pipeline; -use PHPUnit_Framework_TestCase as StandardTestCase; - +use PredisTestCase; use SplQueue; use Predis\Client; use Predis\Response; @@ -20,7 +19,7 @@ use Predis\Response; /** * */ -class AtomicTest extends StandardTestCase +class AtomicTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Pipeline/FireAndForgetTest.php b/tests/Predis/Pipeline/FireAndForgetTest.php index 8df51f89..ad378be0 100644 --- a/tests/Predis/Pipeline/FireAndForgetTest.php +++ b/tests/Predis/Pipeline/FireAndForgetTest.php @@ -11,16 +11,15 @@ namespace Predis\Pipeline; -use PHPUnit_Framework_TestCase as StandardTestCase; - use SplQueue; +use PredisTestCase; use Predis\Client; use Predis\Profile; /** * */ -class FireAndForgetTest extends StandardTestCase +class FireAndForgetTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Pipeline/PipelineTest.php b/tests/Predis/Pipeline/PipelineTest.php index c635c854..c0a844c9 100644 --- a/tests/Predis/Pipeline/PipelineTest.php +++ b/tests/Predis/Pipeline/PipelineTest.php @@ -11,8 +11,9 @@ namespace Predis\Pipeline; -use PHPUnit_Framework_TestCase as StandardTestCase; - +use Exception; +use InvalidArgumentException; +use PredisTestCase; use Predis\Client; use Predis\ClientException; use Predis\Profile; @@ -21,7 +22,7 @@ use Predis\Response; /** * */ -class PipelineTest extends StandardTestCase +class PipelineTest extends PredisTestCase { /** * @group disconnected @@ -331,7 +332,7 @@ class PipelineTest extends StandardTestCase throw new ClientException('TEST'); $pipe->echo('two'); }); - } catch (\Exception $ex) { + } catch (Exception $ex) { $exception = $ex; } @@ -406,7 +407,7 @@ class PipelineTest extends StandardTestCase $pipe->set('foo', 'bar'); throw new ClientException('TEST'); }); - } catch (\Exception $ex) { + } catch (Exception $ex) { $exception = $ex; } @@ -430,7 +431,7 @@ class PipelineTest extends StandardTestCase $pipe->lpush('foo', 'bar'); $pipe->set('hoge', 'piyo'); }); - } catch (\Exception $ex) { + } catch (Exception $ex) { $exception = $ex; } @@ -471,23 +472,7 @@ class PipelineTest extends StandardTestCase */ protected function getClient(array $parameters = array(), array $options = array()) { - $parameters = array_merge(array( - 'scheme' => 'tcp', - 'host' => REDIS_SERVER_HOST, - 'port' => REDIS_SERVER_PORT, - 'database' => REDIS_SERVER_DBNUM, - ), $parameters); - - $options = array_merge(array( - 'profile' => REDIS_SERVER_VERSION, - ), $options); - - $client = new Client($parameters, $options); - - $client->connect(); - $client->flushdb(); - - return $client; + return $this->createClient($parameters, $options); } /** @@ -500,7 +485,7 @@ class PipelineTest extends StandardTestCase { return function ($command) { if (($id = $command->getId()) !== 'ECHO') { - throw new \InvalidArgumentException("Expected ECHO, got {$id}"); + throw new InvalidArgumentException("Expected ECHO, got {$id}"); } list($echoed) = $command->getArguments(); diff --git a/tests/Predis/PredisExceptionTest.php b/tests/Predis/PredisExceptionTest.php index 449e6c62..07b63816 100644 --- a/tests/Predis/PredisExceptionTest.php +++ b/tests/Predis/PredisExceptionTest.php @@ -11,12 +11,12 @@ namespace Predis; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * */ -class PredisExceptionTest extends StandardTestCase +class PredisExceptionTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Profile/FactoryTest.php b/tests/Predis/Profile/FactoryTest.php index 26d61c60..068fd6f0 100644 --- a/tests/Predis/Profile/FactoryTest.php +++ b/tests/Predis/Profile/FactoryTest.php @@ -11,14 +11,13 @@ namespace Predis\Profile; -use PHPUnit_Framework_TestCase as StandardTestCase; - +use PredisTestCase; use Predis\Command\Processor\ProcessorChain; /** * */ -class FactoryTest extends StandardTestCase +class FactoryTest extends PredisTestCase { const DEFAULT_PROFILE_VERSION = '2.8'; const DEVELOPMENT_PROFILE_VERSION = '3.0'; diff --git a/tests/Predis/Profile/RedisUnstableTest.php b/tests/Predis/Profile/RedisUnstableTest.php index cab7976c..ea6b73b8 100644 --- a/tests/Predis/Profile/RedisUnstableTest.php +++ b/tests/Predis/Profile/RedisUnstableTest.php @@ -19,7 +19,7 @@ class RedisUnstableTest extends RedisProfileTestCase /** * {@inheritdoc} */ - public function getProfileInstance() + public function getProfile($version = null) { return new RedisUnstable(); } diff --git a/tests/Predis/Profile/RedisVersion120Test.php b/tests/Predis/Profile/RedisVersion120Test.php index b93b671d..94069099 100644 --- a/tests/Predis/Profile/RedisVersion120Test.php +++ b/tests/Predis/Profile/RedisVersion120Test.php @@ -19,7 +19,7 @@ class RedisVersion120Test extends RedisProfileTestCase /** * {@inheritdoc} */ - public function getProfileInstance() + public function getProfile($version = null) { return new RedisVersion120(); } diff --git a/tests/Predis/Profile/RedisVersion200Test.php b/tests/Predis/Profile/RedisVersion200Test.php index 52fb68cf..ea63f55b 100644 --- a/tests/Predis/Profile/RedisVersion200Test.php +++ b/tests/Predis/Profile/RedisVersion200Test.php @@ -19,7 +19,7 @@ class RedisVersion200Test extends RedisProfileTestCase /** * {@inheritdoc} */ - public function getProfileInstance() + public function getProfile($version = null) { return new RedisVersion200(); } diff --git a/tests/Predis/Profile/RedisVersion220Test.php b/tests/Predis/Profile/RedisVersion220Test.php index 2351e004..90d941da 100644 --- a/tests/Predis/Profile/RedisVersion220Test.php +++ b/tests/Predis/Profile/RedisVersion220Test.php @@ -19,7 +19,7 @@ class RedisVersion220Test extends RedisProfileTestCase /** * {@inheritdoc} */ - public function getProfileInstance() + public function getProfile($version = null) { return new RedisVersion220(); } diff --git a/tests/Predis/Profile/RedisVersion240Test.php b/tests/Predis/Profile/RedisVersion240Test.php index 9617e493..4bca0c4f 100644 --- a/tests/Predis/Profile/RedisVersion240Test.php +++ b/tests/Predis/Profile/RedisVersion240Test.php @@ -19,7 +19,7 @@ class RedisVersion240Test extends RedisProfileTestCase /** * {@inheritdoc} */ - public function getProfileInstance() + public function getProfile($version = null) { return new RedisVersion240(); } diff --git a/tests/Predis/Profile/RedisVersion260Test.php b/tests/Predis/Profile/RedisVersion260Test.php index 598434b3..420cd276 100644 --- a/tests/Predis/Profile/RedisVersion260Test.php +++ b/tests/Predis/Profile/RedisVersion260Test.php @@ -19,7 +19,7 @@ class RedisVersion260Test extends RedisProfileTestCase /** * {@inheritdoc} */ - public function getProfileInstance() + public function getProfile($version = null) { return new RedisVersion260(); } diff --git a/tests/Predis/Profile/RedisVersion280Test.php b/tests/Predis/Profile/RedisVersion280Test.php index 5d42ef7b..5b5263cb 100644 --- a/tests/Predis/Profile/RedisVersion280Test.php +++ b/tests/Predis/Profile/RedisVersion280Test.php @@ -19,7 +19,7 @@ class RedisVersion280Test extends RedisProfileTestCase /** * {@inheritdoc} */ - public function getProfileInstance() + public function getProfile($version = null) { return new RedisVersion280(); } diff --git a/tests/Predis/Protocol/Text/ComposableProtocolProcessorTest.php b/tests/Predis/Protocol/Text/ComposableProtocolProcessorTest.php index e389348b..ff7e0e84 100644 --- a/tests/Predis/Protocol/Text/ComposableProtocolProcessorTest.php +++ b/tests/Predis/Protocol/Text/ComposableProtocolProcessorTest.php @@ -11,12 +11,12 @@ namespace Predis\Protocol\Text; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * */ -class ComposableProtocolProcessorTest extends StandardTestCase +class ComposableProtocolProcessorTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Protocol/Text/Handler/BulkResponseTest.php b/tests/Predis/Protocol/Text/Handler/BulkResponseTest.php index c9de4e24..1a52c7c1 100644 --- a/tests/Predis/Protocol/Text/Handler/BulkResponseTest.php +++ b/tests/Predis/Protocol/Text/Handler/BulkResponseTest.php @@ -11,12 +11,12 @@ namespace Predis\Protocol\Text; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * */ -class BulkResponseTest extends StandardTestCase +class BulkResponseTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Protocol/Text/Handler/ErrorResponseTest.php b/tests/Predis/Protocol/Text/Handler/ErrorResponseTest.php index e575a1e7..c31977d9 100644 --- a/tests/Predis/Protocol/Text/Handler/ErrorResponseTest.php +++ b/tests/Predis/Protocol/Text/Handler/ErrorResponseTest.php @@ -11,12 +11,12 @@ namespace Predis\Protocol\Text; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * */ -class ErrorResponseTest extends StandardTestCase +class ErrorResponseTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Protocol/Text/Handler/IntegerResponseTest.php b/tests/Predis/Protocol/Text/Handler/IntegerResponseTest.php index 6221a5da..41c5c027 100644 --- a/tests/Predis/Protocol/Text/Handler/IntegerResponseTest.php +++ b/tests/Predis/Protocol/Text/Handler/IntegerResponseTest.php @@ -11,12 +11,12 @@ namespace Predis\Protocol\Text; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * */ -class IntegerResponseTest extends StandardTestCase +class IntegerResponseTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Protocol/Text/Handler/MultiBulkResponseTest.php b/tests/Predis/Protocol/Text/Handler/MultiBulkResponseTest.php index 2d8c1ef6..c7d2d36d 100644 --- a/tests/Predis/Protocol/Text/Handler/MultiBulkResponseTest.php +++ b/tests/Predis/Protocol/Text/Handler/MultiBulkResponseTest.php @@ -11,12 +11,12 @@ namespace Predis\Protocol\Text; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * */ -class MultiBulkResponseTest extends StandardTestCase +class MultiBulkResponseTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Protocol/Text/Handler/StatusResponseTest.php b/tests/Predis/Protocol/Text/Handler/StatusResponseTest.php index c788d07a..b211598f 100644 --- a/tests/Predis/Protocol/Text/Handler/StatusResponseTest.php +++ b/tests/Predis/Protocol/Text/Handler/StatusResponseTest.php @@ -11,12 +11,12 @@ namespace Predis\Protocol\Text; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * */ -class StatusResponseTest extends StandardTestCase +class StatusResponseTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Protocol/Text/Handler/StreamableMultiBulkResponseTest.php b/tests/Predis/Protocol/Text/Handler/StreamableMultiBulkResponseTest.php index 3e86a72d..6d4eee54 100644 --- a/tests/Predis/Protocol/Text/Handler/StreamableMultiBulkResponseTest.php +++ b/tests/Predis/Protocol/Text/Handler/StreamableMultiBulkResponseTest.php @@ -11,12 +11,12 @@ namespace Predis\Protocol\Text; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * */ -class StreamableMultiBulkResponseTest extends StandardTestCase +class StreamableMultiBulkResponseTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Protocol/Text/ProtocolProcessorTest.php b/tests/Predis/Protocol/Text/ProtocolProcessorTest.php index f3f1651e..363f4c3e 100644 --- a/tests/Predis/Protocol/Text/ProtocolProcessorTest.php +++ b/tests/Predis/Protocol/Text/ProtocolProcessorTest.php @@ -11,12 +11,12 @@ namespace Predis\Protocol\Text; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * */ -class ProtocolProcessorTest extends StandardTestCase +class ProtocolProcessorTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Protocol/Text/RequestSerializerTest.php b/tests/Predis/Protocol/Text/RequestSerializerTest.php index b78eb698..84ce5098 100644 --- a/tests/Predis/Protocol/Text/RequestSerializerTest.php +++ b/tests/Predis/Protocol/Text/RequestSerializerTest.php @@ -11,12 +11,12 @@ namespace Predis\Protocol\Text; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * */ -class RequestSerializerTest extends StandardTestCase +class RequestSerializerTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Protocol/Text/ResponseReaderTest.php b/tests/Predis/Protocol/Text/ResponseReaderTest.php index a889e243..c860ff69 100644 --- a/tests/Predis/Protocol/Text/ResponseReaderTest.php +++ b/tests/Predis/Protocol/Text/ResponseReaderTest.php @@ -11,12 +11,12 @@ namespace Predis\Protocol\Text; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * */ -class ResponseReaderTest extends StandardTestCase +class ResponseReaderTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/PubSub/ConsumerTest.php b/tests/Predis/PubSub/ConsumerTest.php index 82f7a4f4..1a8bf0a5 100644 --- a/tests/Predis/PubSub/ConsumerTest.php +++ b/tests/Predis/PubSub/ConsumerTest.php @@ -11,8 +11,7 @@ namespace Predis\PubSub; -use PHPUnit_Framework_TestCase as StandardTestCase; - +use PredisTestCase; use Predis\Client; use Predis\Profile; use Predis\PubSub\Consumer as PubSubConsumer; @@ -20,7 +19,7 @@ use Predis\PubSub\Consumer as PubSubConsumer; /** * @group realm-pubsub */ -class ConsumerTest extends StandardTestCase +class ConsumerTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/PubSub/DispatcherLoopTest.php b/tests/Predis/PubSub/DispatcherLoopTest.php index 2f74a8dc..e92c8940 100644 --- a/tests/Predis/PubSub/DispatcherLoopTest.php +++ b/tests/Predis/PubSub/DispatcherLoopTest.php @@ -11,14 +11,13 @@ namespace Predis\PubSub; -use PHPUnit_Framework_TestCase as StandardTestCase; - +use PredisTestCase; use Predis\Client; /** * @group realm-pubsub */ -class DispatcherLoopTest extends StandardTestCase +class DispatcherLoopTest extends PredisTestCase { // ******************************************************************** // // ---- INTEGRATION TESTS --------------------------------------------- // diff --git a/tests/Predis/Replication/ReplicationStrategyTest.php b/tests/Predis/Replication/ReplicationStrategyTest.php index 7424e010..914ffd7c 100644 --- a/tests/Predis/Replication/ReplicationStrategyTest.php +++ b/tests/Predis/Replication/ReplicationStrategyTest.php @@ -11,15 +11,14 @@ namespace Predis\Replication; -use PHPUnit_Framework_TestCase as StandardTestCase; - +use PredisTestCase; use Predis\Command\CommandInterface; use Predis\Profile; /** * */ -class ReplicationStrategyTest extends StandardTestCase +class ReplicationStrategyTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Response/ErrorTest.php b/tests/Predis/Response/ErrorTest.php index 323d405d..508a08f5 100644 --- a/tests/Predis/Response/ErrorTest.php +++ b/tests/Predis/Response/ErrorTest.php @@ -11,12 +11,12 @@ namespace Predis\Response; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * */ -class ErrorTest extends StandardTestCase +class ErrorTest extends PredisTestCase { const ERR_WRONG_KEY_TYPE = 'ERR Operation against a key holding the wrong kind of value'; diff --git a/tests/Predis/Response/Iterator/MultiBulkTest.php b/tests/Predis/Response/Iterator/MultiBulkTest.php index 3b3a99c2..39f5bbeb 100644 --- a/tests/Predis/Response/Iterator/MultiBulkTest.php +++ b/tests/Predis/Response/Iterator/MultiBulkTest.php @@ -11,8 +11,7 @@ namespace Predis\Response\Iterator; -use PHPUnit_Framework_TestCase as StandardTestCase; - +use PredisTestCase; use Predis\Client; use Predis\Connection\ComposableStreamConnection; use Predis\Connection\ConnectionParameters; @@ -21,7 +20,7 @@ use Predis\Protocol\Text\ProtocolProcessor as TextProtocolProcessor; /** * @group realm-iterators */ -class MultiBulkTest extends StandardTestCase +class MultiBulkTest extends PredisTestCase { /** * @group connected @@ -120,27 +119,17 @@ class MultiBulkTest extends StandardTestCase */ protected function getClient() { - $parameters = new ConnectionParameters(array( - 'host' => REDIS_SERVER_HOST, - 'port' => REDIS_SERVER_PORT, - 'read_write_timeout' => 2, - )); - - $options = array( - 'profile' => REDIS_SERVER_VERSION, - ); + $parameters = $this->getParameters(array('read_write_timeout' => 2)); $protocol = new TextProtocolProcessor(); $protocol->useIterableMultibulk(true); $connection = new ComposableStreamConnection($parameters, $protocol); - $client = new Client($connection, $options); + $client = new Client($connection); $client->connect(); - $client->select(REDIS_SERVER_DBNUM); $client->flushdb(); return $client; } - } diff --git a/tests/Predis/Response/Iterator/MultiBulkTupleTest.php b/tests/Predis/Response/Iterator/MultiBulkTupleTest.php index b9815c9d..3fa16a7e 100644 --- a/tests/Predis/Response/Iterator/MultiBulkTupleTest.php +++ b/tests/Predis/Response/Iterator/MultiBulkTupleTest.php @@ -11,8 +11,7 @@ namespace Predis\Response\Iterator; -use PHPUnit_Framework_TestCase as StandardTestCase; - +use PredisTestCase; use Predis\Client; use Predis\Connection\ComposableStreamConnection; use Predis\Connection\ConnectionParameters; @@ -21,7 +20,7 @@ use Predis\Protocol\Text\ProtocolProcessor as TextProtocolProcessor; /** * @group realm-iterators */ -class MultiBulkTupleTest extends StandardTestCase +class MultiBulkTupleTest extends PredisTestCase { /** * @group disconnected @@ -106,27 +105,17 @@ class MultiBulkTupleTest extends StandardTestCase */ protected function getClient() { - $parameters = new ConnectionParameters(array( - 'host' => REDIS_SERVER_HOST, - 'port' => REDIS_SERVER_PORT, - 'read_write_timeout' => 2, - )); - - $options = array( - 'profile' => REDIS_SERVER_VERSION, - ); + $parameters = $this->getParameters(array('read_write_timeout' => 2)); $protocol = new TextProtocolProcessor(); $protocol->useIterableMultibulk(true); $connection = new ComposableStreamConnection($parameters, $protocol); - $client = new Client($connection, $options); + $client = new Client($connection); $client->connect(); - $client->select(REDIS_SERVER_DBNUM); $client->flushdb(); return $client; } - } diff --git a/tests/Predis/Response/ServerExceptionTest.php b/tests/Predis/Response/ServerExceptionTest.php index 822d057f..3b030399 100644 --- a/tests/Predis/Response/ServerExceptionTest.php +++ b/tests/Predis/Response/ServerExceptionTest.php @@ -11,12 +11,12 @@ namespace Predis\Response; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * */ -class ServerExceptionTest extends StandardTestCase +class ServerExceptionTest extends PredisTestCase { const ERR_WRONG_KEY_TYPE = 'ERR Operation against a key holding the wrong kind of value'; diff --git a/tests/Predis/Response/StatusQueuedTest.php b/tests/Predis/Response/StatusQueuedTest.php index 58759aff..a7d43334 100644 --- a/tests/Predis/Response/StatusQueuedTest.php +++ b/tests/Predis/Response/StatusQueuedTest.php @@ -11,12 +11,12 @@ namespace Predis\Response; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * */ -class StatusQueuedTest extends StandardTestCase +class StatusQueuedTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Transaction/AbortedMultiExecExceptionTest.php b/tests/Predis/Transaction/AbortedMultiExecExceptionTest.php index 3801c811..6240ef1d 100644 --- a/tests/Predis/Transaction/AbortedMultiExecExceptionTest.php +++ b/tests/Predis/Transaction/AbortedMultiExecExceptionTest.php @@ -11,14 +11,13 @@ namespace Predis\Transaction; -use PHPUnit_Framework_TestCase as StandardTestCase; - +use PredisTestCase; use Predis\Client; /** * */ -class AbortedMultiExecExceptionTest extends StandardTestCase +class AbortedMultiExecExceptionTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Transaction/MultiExecStateTest.php b/tests/Predis/Transaction/MultiExecStateTest.php index 2607a064..e4d39477 100644 --- a/tests/Predis/Transaction/MultiExecStateTest.php +++ b/tests/Predis/Transaction/MultiExecStateTest.php @@ -11,12 +11,12 @@ namespace Predis\Transaction; -use PHPUnit_Framework_TestCase as StandardTestCase; +use PredisTestCase; /** * @group realm-transaction */ -class MultiExecStateTest extends StandardTestCase +class MultiExecStateTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Transaction/MultiExecTest.php b/tests/Predis/Transaction/MultiExecTest.php index 60981943..682a6572 100644 --- a/tests/Predis/Transaction/MultiExecTest.php +++ b/tests/Predis/Transaction/MultiExecTest.php @@ -11,8 +11,7 @@ namespace Predis\Transaction; -use PHPUnit_Framework_TestCase as StandardTestCase; - +use PredisTestCase; use Predis\Client; use Predis\Command\CommandInterface; use Predis\Response; @@ -20,7 +19,7 @@ use Predis\Response; /** * @group realm-transaction */ -class MultiExecTest extends StandardTestCase +class MultiExecTest extends PredisTestCase { /** * @group disconnected @@ -862,22 +861,6 @@ class MultiExecTest extends StandardTestCase */ protected function getClient(array $parameters = array(), array $options = array()) { - $parameters = array_merge(array( - 'scheme' => 'tcp', - 'host' => REDIS_SERVER_HOST, - 'port' => REDIS_SERVER_PORT, - 'database' => REDIS_SERVER_DBNUM, - ), $parameters); - - $options = array_merge(array( - 'profile' => REDIS_SERVER_VERSION - ), $options); - - $client = new Client($parameters, $options); - - $client->connect(); - $client->flushdb(); - - return $client; + return $this->createClient($parameters, $options); } } diff --git a/tests/bootstrap.php b/tests/bootstrap.php index a6ffdc7d..43134e9b 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -13,6 +13,7 @@ require __DIR__.'/../autoload.php'; require __DIR__.'/PHPUnit/ArrayHasSameValuesConstraint.php'; require __DIR__.'/PHPUnit/RedisCommandConstraint.php'; +require __DIR__.'/PHPUnit/PredisTestCase.php'; require __DIR__.'/PHPUnit/CommandTestCase.php'; require __DIR__.'/PHPUnit/ConnectionTestCase.php'; require __DIR__.'/PHPUnit/RedisProfileTestCase.php';