static function shuffle($array) { $keys = array_keys($array); shuffle($keys); return array_merge(array_flip($keys), $array); }
public function testShuffle() { $users = $this->users; $users = a::shuffle($users); // the only testable thing is that keys still exist $this->assertTrue(isset($users['userA'])); }