Exemple #1
0
 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));
 }
Exemple #2
0
 /**
  * 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;
 }
Exemple #3
0
 /**
  * @expectedException InvalidArgumentException
  */
 public function testGetMaximumOccurrenceOfThrowsExceptionOnInvalidFieldTag()
 {
     $r = new LocalRecord();
     $r->getMaximumOccurrenceOf('@@@@');
 }