|
@@ -23,8 +23,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)
|
|
|
{
|
|
@@ -38,7 +38,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)
|
|
|
{
|
|
@@ -56,7 +56,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)
|
|
|
{
|
|
@@ -94,7 +94,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)
|
|
@@ -105,7 +105,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\Parameters Default connection parameters.
|
|
|
*/
|
|
|
protected function getParameters($additional = array())
|
|
@@ -119,7 +119,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 Profile\ProfileInterface
|
|
|
*/
|
|
|
protected function getProfile($version = null)
|
|
@@ -130,7 +130,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)
|
|
@@ -158,8 +158,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)
|
|
@@ -170,7 +170,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 {
|
|
@@ -187,8 +187,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)
|
|
@@ -204,10 +204,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)
|