19 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
23 require_once
'./Services/WorkflowEngine/classes/workflows/class.ilEmptyWorkflow.php';
27 require_once
'./Services/WorkflowEngine/classes/nodes/class.ilBasicNode.php';
31 $this->workflow->addNode($this->node);
33 require_once
'./Services/WorkflowEngine/classes/detectors/class.ilDataDetector.php';
39 if ($ilSetting != null) {
40 $ilSetting->delete(
'IL_PHPUNIT_TEST_TIME');
41 $ilSetting->delete(
'IL_PHPUNIT_TEST_MICROTIME');
54 'Construction failed with valid context passed to constructor.' 64 $workflow->addNode($node);
68 $detector->setDetectorState(
true);
74 if (!$detector->getDetectorState()) {
78 if ($node->isActive()) {
86 $this->assertTrue($valid_state,
'Invalid state after setting of detector state.');
95 $workflow->addNode($node);
99 $detector->trigger(null);
104 if (!$detector->getDetectorState()) {
105 $valid_state =
false;
108 if ($node->isActive()) {
113 $valid_state =
false;
116 $this->assertTrue($valid_state,
'Invalid state after setting of detector state.');
125 $actual = $detector->getContext();
128 if ($actual === $this->node) {
129 $this->assertEquals($actual, $this->node);
131 $this->assertTrue(
false,
'Context not identical.');
testConstructorValidContext()
ilDataDetectorTest is part of the petri net based workflow engine.