shuffle() public method

Shuffle all elements in the array
public shuffle ( ) : object
return object a new shuffled collection
 public function testShuffleReindexed()
 {
     $collection = new Collection(['first' => new Bar('a'), 'second' => new Bar('b'), 'third' => new Bar('c'), 'fourth' => new Bar('c')]);
     $result = $collection->shuffle(false);
     $this->assertArrayHasKey(0, $result);
     $this->assertArrayHasKey(1, $result);
     $this->assertArrayHasKey(2, $result);
     $this->assertArrayHasKey(3, $result);
 }