/** * @test */ public function 添字配列がマージされている事を確認() { $expected = ['foo', 'bar', 'baz', 'qux']; $collection = new Collection(['foo', 'bar']); $actual = $collection->merge(['baz', 'qux'])->all(); $this->assertEquals($expected, $actual); }
public function testMergeCollection() { $c = new Collection(['name' => 'Hello']); $this->assertEquals(['name' => 'World', 'id' => 1], $c->merge(new Collection(['name' => 'World', 'id' => 1]))->all()); }