public function testUnifyingByClosure()
{
$fn = function ($value, $key, $collection) {
return $key === 0 ? 'zero' : 'else';
};
$this->assertSame([0 => 'value1', 1 => 'value2'], unique($this->list, $fn));
$this->assertSame([0 => 'value1', 1 => 'value2'], unique($this->listIterator, $fn));
$fn = function ($value, $key, $collection) {
return 0;
};
$this->assertSame(['k1' => 'val1'], unique($this->hash, $fn));
$this->assertSame(['k1' => 'val1'], unique($this->hashIterator, $fn));
}