From 7ebb8a8b42625f03ba9496983f64902beb41b179 Mon Sep 17 00:00:00 2001 From: Daniele Alessandri Date: Sun, 22 Dec 2013 14:06:39 +0100 Subject: [PATCH] [tests] Fix a couple of glitches in our base PHPUnit classes. --- tests/PHPUnit/PredisTestCase.php | 2 +- tests/PHPUnit/RedisCommandConstraint.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/PHPUnit/PredisTestCase.php b/tests/PHPUnit/PredisTestCase.php index 5551aa6a..22643a50 100644 --- a/tests/PHPUnit/PredisTestCase.php +++ b/tests/PHPUnit/PredisTestCase.php @@ -196,7 +196,7 @@ abstract class PredisTestCase extends PHPUnit_Framework_TestCase protected function executeOnProfileVersion($expectedVersion, $operator, $callback) { $profile = $this->getProfile(); - $comparation = version_compare($profile->getVersion(), $expectedVersion); + $comparation = version_compare($version = $profile->getVersion(), $expectedVersion); if ($match = eval("return $comparation $operator 0;")) { call_user_func($callback, $this, $version); diff --git a/tests/PHPUnit/RedisCommandConstraint.php b/tests/PHPUnit/RedisCommandConstraint.php index 9253d0b5..dee7d869 100644 --- a/tests/PHPUnit/RedisCommandConstraint.php +++ b/tests/PHPUnit/RedisCommandConstraint.php @@ -26,7 +26,7 @@ class RedisCommandConstraint extends PHPUnit_Framework_Constraint { if ($command instanceof CommandInterface) { $this->commandID = strtoupper($command->getId()); - $this->arguments = $arguments ?: $commant->getArguments(); + $this->arguments = $arguments ?: $command->getArguments(); } else { $this->commandID = strtoupper($command); $this->arguments = $arguments;