Double assertion with if clause to satisfy phpstan in tests

This commit is contained in:
Joshua Ramon Enslin 2023-10-02 14:54:33 +02:00
parent 641783f8a6
commit 7e43e48f2b
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -145,6 +145,10 @@ final class MDPlausiForLegalStatusTest extends TestCase {
self::assertEquals(MDPlausiLegalCheckResultType::expect_restricted_legal_status, $warningStatus['msgs'][0]['type']);
self::assertArrayHasKey('additional', $warningStatus['msgs'][0]);
// For phpstan
if (empty($warningStatus['msgs'][0]['additional'])) {
throw new Exception("Output array should have key 'additional'");
}
self::assertEquals(MDCopyrightCollective::vg_bildkunst, $warningStatus['msgs'][0]['additional']['representation']);
}