mirror of
https://github.com/predis/predis.git
synced 2026-09-05 07:16:44 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user