Fix handling of scripted commands with redis-cluster hash strategy.

A missing "use" directive was preventing the hash strategy to properly
use the specific methods of Predis\Command\ScriptedCommand, falling back
to analyzing the raw arguments array of the command.
This commit is contained in:
Daniele Alessandri
2013-03-16 16:24:59 +01:00
parent 6e2fd181f1
commit 94c4e2ffee
2 changed files with 2 additions and 1 deletions
@@ -13,6 +13,7 @@ namespace Predis\Cluster;
use Predis\Cluster\Hash\CRC16HashGenerator;
use Predis\Command\CommandInterface;
use Predis\Command\ScriptedCommand;
/**
* Default class used by Predis to calculate hashes out of keys of
@@ -186,7 +186,7 @@ class RedisClusterHashStrategyTest extends StandardTestCase
$command->expects($this->once())
->method('getScript')
->will($this->returnValue('return true'));
$command->expects($this->exactly(1))
$command->expects($this->exactly(2))
->method('getKeysCount')
->will($this->returnValue(1));
$command->setArguments($arguments);