Add tests to ensure invalid IDs are not validated
This commit is contained in:
@ -375,7 +375,6 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable {
|
||||
return false;
|
||||
}
|
||||
if (self::_is_numeric(strtr($id, ['-' => '', 'X' => ''])) === false) {
|
||||
throw new Exception($id);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -611,9 +610,9 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable {
|
||||
'https://vocab.getty.edu/page/aat/',
|
||||
]),
|
||||
self::ackerbau => self::validateNumericId($id, ['https://term.museum-digital.de/ackerbau/tag/']),
|
||||
self::bne => self::validateBneId($id, ['http://datos.bne.es/persona/']),
|
||||
self::bne => self::validateBneId($id, ['http://datos.bne.es/persona/', 'https://datos.bne.es/persona/']),
|
||||
self::bnf => self::validateBnfId($id),
|
||||
self::cona => self::validateNumericId($id, ['https://vocab.getty.edu/page/cona/']),
|
||||
self::cona => self::validateNumericId($id, ['http://vocab.getty.edu/page/cona/', 'https://vocab.getty.edu/page/cona/']),
|
||||
self::editionhumboldtdigital => self::validateGndId($id, ['https://edition-humboldt.de/register/personen/detail.xql?normid=http://d-nb.info/gnd/']),
|
||||
self::gnd => self::validateGndId($id, ['http://d-nb.info/gnd/', 'https://d-nb.info/gnd/']),
|
||||
self::grobsystematik => self::validateNumericId($id, ['https://term.museum-digital.de/grobsystematik/tag/']),
|
||||
|
Reference in New Issue
Block a user