public function testDuplicateKeys() { $fn = function ($v, $k, $collection) { InvalidArgumentException::assertCollection($collection, __FUNCTION__, 3); return $k[0]; }; $this->assertSame(['k' => 'val2'], reindex($this->hash, $fn)); }