Example #1
0
 public function testAppendingMultipleElement()
 {
     $data = [new Entity(['id' => 1]), new Entity(['id' => 2])];
     $collection = new Collection($data);
     $this->assertEquals(2, $collection->count());
     $this->assertEquals([['id' => 1], ['id' => 2]], $collection->toArray());
 }