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/emitters/class.ilActivationEmitter.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 $actual = $emitter->getContext();
67 if ($actual === $this->node) {
68 $this->assertEquals($actual, $this->node);
70 $this->assertTrue(
false,
'Context not identical.');
77 require_once
'./Services/WorkflowEngine/classes/detectors/class.ilSimpleDetector.php';
80 $target_node->addDetector($target_detector);
85 $emitter->setTargetDetector($target_detector);
88 $actual = $emitter->getTargetDetector();
89 $this->assertEquals($target_detector, $actual);
95 require_once
'./Services/WorkflowEngine/classes/detectors/class.ilSimpleDetector.php';
98 $target_node->addDetector($target_detector);
102 $target_node->addDetector($foo_detector);
105 $emitter->setTargetDetector($target_detector);
110 $actual = $target_detector->getDetectorState();
111 $this->assertTrue($actual);
117 require_once
'./Services/WorkflowEngine/classes/detectors/class.ilSimpleDetector.php';
121 $target_node->addDetector($foo_detector);
122 $target_node->addDetector($target_detector);
131 $emitter->setTargetDetector($target_detector);
136 $actual = $target_node->isActive();
137 $this->assertTrue($actual);
ilActivationEmitterTest is part of the petri net based workflow engine.
testEmitActivationValidState()
testSetGetTargetDetector()
testConstructorValidContext()