public function testAppendingSingleElement() { $collection = new Collection([new Entity(['id' => 1])]); $this->assertEquals(1, $collection->count()); $collection->append(new Entity(['id' => 2])); $this->assertEquals(2, $collection->count()); $this->assertEquals([['id' => 1], ['id' => 2]], $collection->toArray()); }