Add test to ensure non-production events are not considered by
MDPlausiForLegalStatusTest
This commit is contained in:
parent
32c4c46856
commit
fbcf66d906
|
@ -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.
|
* Ensures that a warning is returned if the author / creator died only in the current year.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user