/** * @covers ::toArray */ public function testToArray() { $models = [new City(), new City()]; $link = new LinkMany(new Country(), Country::getRepo()->getRel('cities'), $models); $array = $link->toArray(); $this->assertSame($models, $array); }