/** * @dataProvider simpleArrayProvider */ public function testGetRandomKey(array $array) { if (0 === count($array)) { return; } $ma = new ImmutableArray($array); $key = $ma->getRandomKey(); $this->assertTrue(null !== $key); $this->assertTrue(array_key_exists($key, $ma->toArray())); }