public function testReverse() { $expected = ['c', 'b', 'a']; $collection = new Collection(['a', 'b', 'c']); $reversed = $collection->reverse(); $this->assertInstanceOf(Collection::class, $reversed); $this->assertNotSame($collection, $reversed); $this->assertSame($expected, $reversed->toArray()); }