public function testPopItem() { $fruits = new Collection(['strawberry', 'Orange', 'Yellow', 'Purple']); $this->assertEquals(['strawberry', 'Orange', 'Yellow'], $fruits->pop()->all()->toArray()); }