public function testLocalRecordReference() { $l = new LocalRecord(); $c = new CopyRecord(); $this->assertNull($c->getLocalRecord()); $l->addCopyRecord($c); $this->assertSame($l, $c->getLocalRecord()); $c->unsetLocalRecord(); $this->assertNull($c->getLocalRecord()); $this->assertFalse($l->containsCopyRecord($c)); }
/** * 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; }
/** * @expectedException InvalidArgumentException */ public function testGetMaximumOccurrenceOfThrowsExceptionOnInvalidFieldTag() { $r = new LocalRecord(); $r->getMaximumOccurrenceOf('@@@@'); }