瀏覽代碼

[tests] Fix a couple of glitches in our base PHPUnit classes.

Daniele Alessandri 11 年之前
父節點
當前提交
d628c0f23b
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      tests/PHPUnit/PredisTestCase.php
  2. 1 1
      tests/PHPUnit/RedisCommandConstraint.php

+ 1 - 1
tests/PHPUnit/PredisTestCase.php

@@ -197,7 +197,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);

+ 1 - 1
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;