/** * {@inheritdoc} */ public function remove($key) { $hash = Hasher::hash($key); if (isset($this->buckets[$hash])) { if ($this->buckets[$hash]->remove($key)) { $this->count--; if ($this->buckets[$hash]->isEmpty()) { unset($this->buckets[$hash]); } } } }
public function test_that_hash_returns_expected_value_for_array() { $expected = '9568b1b3'; $this->assertSame($expected, Hasher::hash(['foo', 'bar', 'baz'], static::HASH_ALGO)); }