/** * @covers ::getNext */ public function testGetNext() { $models = [new City(), new City()]; $link = new LinkMany(new Country(), Country::getRepo()->getRel('cities'), $models); $link->getFirst(); $this->assertSame($models[1], $link->getNext()); $next = $link->getNext(); $this->assertInstanceof('Harp\\Harp\\Test\\TestModel\\City', $next); $this->assertTrue($next->isVoid()); }