public function union($items) { return new static($this->items + $this->getArrayableItems($items)); }
public function testUnionCollection() { $c = new Collection(['name' => 'Hello']); $this->assertEquals(['name' => 'Hello', 'id' => 1], $c->union(new Collection(['name' => 'World', 'id' => 1]))->all()); }