Example #1
0
 public function testGetFirstMatchingField()
 {
     $record = new AuthorityRecord(array(new Field('001@', 0), new Field('001@', 1)));
     $this->assertNull($record->getFirstMatchingField('002@/00'));
     $this->assertInstanceOf('HAB\\Pica\\Record\\Field', $record->getFirstMatchingField('001@'));
 }
Example #2
0
 /**
  * @expectedException InvalidArgumentException
  */
 public function testAppendThrowsExceptionOnInvalidLevel()
 {
     $r = new AuthorityRecord();
     $r->append(new Field('101@', 0));
 }