/** * Set the containing local record. * * @param LocalRecord $record Local record * @return void */ public function setLocalRecord(LocalRecord $record) { $this->unsetLocalRecord(); if (!$record->containsCopyRecord($this)) { $record->addCopyRecord($this); } $this->_parent = $record; }
public function testContainsCopyRecord() { $r = new LocalRecord(); $c = new CopyRecord(); $this->assertFalse($r->containsCopyRecord($c)); $r->addCopyRecord($c); $this->assertTrue($r->containsCopyRecord($c)); }