/** * @covers ::isChanged */ public function testIsChanged() { $city = new City(); $link = new LinkMany(new Country(), Country::getRepo()->getRel('cities'), [$city]); $this->assertFalse($link->isChanged()); $link->add($city); $this->assertFalse($link->isChanged()); $newCity = new City(); $link->add($newCity); $this->assertTrue($link->isChanged()); }