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@')); }
/** * @expectedException InvalidArgumentException */ public function testAppendThrowsExceptionOnInvalidLevel() { $r = new AuthorityRecord(); $r->append(new Field('101@', 0)); }