mirror of
https://github.com/predis/predis.git
synced 2026-10-10 13:57:22 +00:00
Fix implementation for hash tags extraction from keys.
We now fully comply with the specifications defined by Redis.
This commit is contained in:
@@ -29,7 +29,14 @@ class RedisStrategyTest extends PredisTestCase
|
||||
$this->assertSame(44950, $strategy->getKeyHash('{foo}'));
|
||||
$this->assertSame(44950, $strategy->getKeyHash('{foo}:bar'));
|
||||
$this->assertSame(44950, $strategy->getKeyHash('{foo}:baz'));
|
||||
$this->assertSame(44950, $strategy->getKeyHash('bar:{foo}:bar'));
|
||||
$this->assertSame(44950, $strategy->getKeyHash('bar:{foo}:baz'));
|
||||
$this->assertSame(44950, $strategy->getKeyHash('bar:{foo}:{baz}'));
|
||||
|
||||
$this->assertSame(44950, $strategy->getKeyHash('bar:{foo}:baz{}'));
|
||||
$this->assertSame(9415, $strategy->getKeyHash('{}bar:{foo}:baz'));
|
||||
|
||||
$this->assertSame(0, $strategy->getKeyHash(''));
|
||||
$this->assertSame(31641, $strategy->getKeyHash('{}'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user