public function testYouCanFlipACollection() { $s1 = Collection::create([1, 2, 3, 6, 7])->flip()->toArray(); $this->assertEquals([1 => 0, 2 => 1, 3 => 2, 6 => 3, 7 => 4], $s1); }