Identify https://vocab.getty.edu/ulan/ as a prefix for ULAN links
This commit is contained in:
2 files changed
+28
No files matched your search
@@ -843,6 +843,8 @@ public function validateId(string $id):string|false {
|
|||||||
'http://vocab.getty.edu/ulan/',
|
'http://vocab.getty.edu/ulan/',
|
||||||
'http://vocab.getty.edu/page/ulan/',
|
'http://vocab.getty.edu/page/ulan/',
|
||||||
'https://vocab.getty.edu/page/ulan/',
|
'https://vocab.getty.edu/page/ulan/',
|
||||||
|
'https://vocab.getty.edu/page/ulan/',
|
||||||
|
'https://vocab.getty.edu/ulan/',
|
||||||
'http://www.getty.edu/vow/ULANFullDisplay?find=&role=&nation=&subjectid=',
|
'http://www.getty.edu/vow/ULANFullDisplay?find=&role=&nation=&subjectid=',
|
||||||
'https://www.getty.edu/vow/ULANFullDisplay?find=&role=&nation=&subjectid=',
|
'https://www.getty.edu/vow/ULANFullDisplay?find=&role=&nation=&subjectid=',
|
||||||
]),
|
]),
|
||||||
|
|||||||
@@ -201,6 +201,17 @@ public static function npgIdForValidationProvider():Generator {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Data provider for validating NPG IDs (National Portrait Gallery).
|
||||||
|
*
|
||||||
|
* @return Generator<string, array{0: string|false, 1: string}>
|
||||||
|
*/
|
||||||
|
public static function ulanIdForValidationProvider():Generator {
|
||||||
|
|
||||||
|
yield "Full URL, https / https://vocab.getty.edu/ulan/500054662" => ["500054662", "https://vocab.getty.edu/ulan/500054662"];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ensure validating NPG entries works (National Portrait Gallery).
|
* Ensure validating NPG entries works (National Portrait Gallery).
|
||||||
*
|
*
|
||||||
@@ -216,6 +227,21 @@ public function testNpgIdValidation(string|false $expected, string $inputString)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ensure validating ULAN entries works.
|
||||||
|
*
|
||||||
|
* @param string|false $expected Expected output.
|
||||||
|
* @param string $inputString Input string.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
#[DataProvider('ulanIdForValidationProvider')]
|
||||||
|
public function testUlanIdValidation(string|false $expected, string $inputString):void {
|
||||||
|
|
||||||
|
self::assertEquals($expected, MDNodaRepository::ulan->validateId($inputString));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Data provider for validating references to the Library of Congress works.
|
* Data provider for validating references to the Library of Congress works.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in new issue
Block a user