Fix order of if-else block (check time ending before actor is born (=

full warning) before checking time starting before actor birth (limited
warning))
This commit is contained in:
2023-10-06 23:19:42 +02:00
parent 7596d9f18e
commit aef095af3c
2 changed files with 31 additions and 6 deletions

View File

@ -51,5 +51,30 @@ final class MDPlausiTest extends TestCase {
self::assertTrue($plausi->getWarningStatus());
}
/**
* Ensures that a warning is returned, Checks the integration / evaluation function.
*
* @return void
*/
public function testActorProducingObjectBeforeOwnBirthResultsInWarning():void {
$tlLoader = new MDTlLoader("plausi_test", "en");
$plausiEvent = new MDPlausiEvent(1,
"1812",
"1812",
"1812",
"Helmut Meyer",
"1859",
"1900");
$plausi = new MDPlausi($tlLoader, [$plausiEvent]);
$plausi->evaluate();
self::assertTrue($plausi->getWarningStatus(), "Production before birth of the actor should result in a full warning." . PHP_EOL . PHP_EOL . "Current plausi status is:" . PHP_EOL . var_export($plausi, true));
}
}