|
@@ -24,8 +24,8 @@ 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.
|
|
|
+ * @param string|CommandInterface $command Expected command or command ID.
|
|
|
+ * @param array $arguments Expected command arguments.
|
|
|
*/
|
|
|
public function isRedisCommand($command = null, array $arguments = null)
|
|
|
{
|
|
@@ -39,7 +39,7 @@ abstract class PredisTestCase extends PHPUnit_Framework_TestCase
|
|
|
* instance for $expected.
|
|
|
*
|
|
|
* @param array|string|CommandInterface $expected Expected command.
|
|
|
- * @param mixed $actual Actual command.
|
|
|
+ * @param mixed $actual Actual command.
|
|
|
*/
|
|
|
public function assertRedisCommand($expected, $actual)
|
|
|
{
|
|
@@ -57,7 +57,7 @@ abstract class PredisTestCase extends PHPUnit_Framework_TestCase
|
|
|
* Asserts that two arrays have the same values, even if with different order.
|
|
|
*
|
|
|
* @param array $expected Expected array.
|
|
|
- * @param array $actual Actual array.
|
|
|
+ * @param array $actual Actual array.
|
|
|
*/
|
|
|
public function assertSameValues(array $expected, array $actual)
|
|
|
{
|
|
@@ -95,7 +95,7 @@ abstract class PredisTestCase extends PHPUnit_Framework_TestCase
|
|
|
* Returns a named array with the default connection parameters merged with
|
|
|
* the specified additional parameters.
|
|
|
*
|
|
|
- * @param array $additional Additional connection parameters.
|
|
|
+ * @param array $additional Additional connection parameters.
|
|
|
* @return array Connection parameters.
|
|
|
*/
|
|
|
protected function getParametersArray(array $additional)
|
|
@@ -106,7 +106,7 @@ abstract class PredisTestCase extends PHPUnit_Framework_TestCase
|
|
|
/**
|
|
|
* Returns a new instance of connection parameters.
|
|
|
*
|
|
|
- * @param array $additional Additional connection parameters.
|
|
|
+ * @param array $additional Additional connection parameters.
|
|
|
* @return Connection\ConnectionParameters Default connection parameters.
|
|
|
*/
|
|
|
protected function getParameters($additional = array())
|
|
@@ -120,7 +120,7 @@ abstract class PredisTestCase extends PHPUnit_Framework_TestCase
|
|
|
/**
|
|
|
* Returns a new instance of server profile.
|
|
|
*
|
|
|
- * @param array $additional Additional connection parameters.
|
|
|
+ * @param array $additional Additional connection parameters.
|
|
|
* @return ServerProfileInterface
|
|
|
*/
|
|
|
protected function getProfile($version = null)
|
|
@@ -131,7 +131,7 @@ abstract class PredisTestCase extends PHPUnit_Framework_TestCase
|
|
|
/**
|
|
|
* Returns a new client instance.
|
|
|
*
|
|
|
- * @param bool $connect Flush selected database before returning the client.
|
|
|
+ * @param bool $connect Flush selected database before returning the client.
|
|
|
* @return Client
|
|
|
*/
|
|
|
protected function createClient(array $parameters = null, array $options = null, $flushdb = true)
|
|
@@ -159,8 +159,8 @@ abstract class PredisTestCase extends PHPUnit_Framework_TestCase
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param string $expectedVersion Expected redis version
|
|
|
- * @param string $operator Comparison operator.
|
|
|
+ * @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)
|
|
@@ -171,7 +171,7 @@ abstract class PredisTestCase extends PHPUnit_Framework_TestCase
|
|
|
if (isset($info['server']['redis_version'])) {
|
|
|
// Redis >= 2.6
|
|
|
$version = $info['server']['redis_version'];
|
|
|
- } else if (isset($info['redis_version'])) {
|
|
|
+ } elseif (isset($info['redis_version'])) {
|
|
|
// Redis < 2.6
|
|
|
$version = $info['redis_version'];
|
|
|
} else {
|
|
@@ -188,8 +188,8 @@ abstract class PredisTestCase extends PHPUnit_Framework_TestCase
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param string $expectedVersion Expected redis version
|
|
|
- * @param string $operator Comparison operator.
|
|
|
+ * @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)
|
|
@@ -205,10 +205,10 @@ abstract class PredisTestCase extends PHPUnit_Framework_TestCase
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @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
|
|
|
+ * @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)
|