public function testRemoveNumericItem() { $fruits = new Collection(['Strawberry', 'Orange', 'Yellow', 'Purple']); $this->assertArrayNotHasKey(2, $fruits->remove(2)->all()->toArray()); }