Add test to ensure all concordance lists throw the same error

(MDImporterMissingConcordance)
This commit is contained in:
Joshua Ramon Enslin 2023-06-23 19:19:11 +02:00
parent 75f2538e16
commit 6466aa9b98
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -41,11 +41,6 @@ final class InterfaceImplementationTest extends TestCase {
/**
* Test all concordance lists for their implementation of MDImporterConcordanceListInterface.
*
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
* @group ValidOutput
* @group HTMLOutput
* @group SafeForProduction
*
* @return void
*/
public function testListInterfaceIsImplemented():void {
@ -61,4 +56,19 @@ final class InterfaceImplementationTest extends TestCase {
}
}
/**
* Ensure all tests throw the MDImporterMissingConcordance exception, if
* a new value is encountered.
*
* @return void
*/
public function testMDImporterMissingConcordanceIsThrownForNewValues():void {
foreach ($this->_lists as $list) {
$this->expectException(MDImporterMissingConcordance::class);
(new $list)::getConcordanceTarget("ThisInputShouldNotExist");
}
}
}