diff --git a/tests/MDPlausiForLegalStatusTest.php b/tests/MDPlausiForLegalStatusTest.php index 125ee9c..5378f81 100644 --- a/tests/MDPlausiForLegalStatusTest.php +++ b/tests/MDPlausiForLegalStatusTest.php @@ -72,6 +72,39 @@ final class MDPlausiForLegalStatusTest extends TestCase { } + /** + * Ensures that a warning is returned, if the object's representations are published under + * restrictive licenses Checks the integration / evaluation function. + * + * @return void + */ + public function testPublicDomainObjectExpectsPdWithNonProductionSecondEvent():void { + + $plausiEvent = new MDPlausiEvent(1, + "1899", + "1899", + "1899", + "Helmut Meyer23", + "1859", + "1900"); + + $plausiEvent2 = new MDPlausiEvent(6, + "1999", + "1999", + "1999", + "Somebody else", + "1999", + "2000"); + + $plausiLegal = new MDPlausiForLegalStatus([$plausiEvent, $plausiEvent2], [['name' => 'test23.jpg', 'license' => 'RR-F']]); + $warningStatus = $plausiLegal->evaluateSimple(); + + self::assertTrue($warningStatus['has_warning']); + self::assertNotEmpty($warningStatus['msgs']); + self::assertEquals(MDPlausiLegalCheckResultType::expect_public_domain, $warningStatus['msgs'][0]['type']); + + } + /** * Ensures that a warning is returned if the author / creator died only in the current year. *