From 6466aa9b98c4f855f30171bfeb3f0db163d8cd60 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Fri, 23 Jun 2023 19:19:11 +0200 Subject: [PATCH] Add test to ensure all concordance lists throw the same error (MDImporterMissingConcordance) --- tests/InterfaceImplementationTest.php | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/tests/InterfaceImplementationTest.php b/tests/InterfaceImplementationTest.php index c565140..7d25de8 100644 --- a/tests/InterfaceImplementationTest.php +++ b/tests/InterfaceImplementationTest.php @@ -41,11 +41,6 @@ final class InterfaceImplementationTest extends TestCase { /** * Test all concordance lists for their implementation of MDImporterConcordanceListInterface. * - * @author Joshua Ramon Enslin - * @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"); + } + + } }