ilActivationEmitterTest is part of the petri net based workflow engine.
More...
ilActivationEmitterTest is part of the petri net based workflow engine.
This class holds all tests for the class emitters/class.ilActivationEmitter
- Author
- Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
- Version
- $Id$
/
Definition at line 15 of file ilActivationEmitterTest.php.
◆ setUp()
ilActivationEmitterTest::setUp |
( |
| ) |
|
Definition at line 17 of file ilActivationEmitterTest.php.
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';
◆ tearDown()
ilActivationEmitterTest::tearDown |
( |
| ) |
|
Definition at line 36 of file ilActivationEmitterTest.php.
References $ilSetting.
39 if ($ilSetting != null) {
40 $ilSetting->delete(
'IL_PHPUNIT_TEST_TIME');
41 $ilSetting->delete(
'IL_PHPUNIT_TEST_MICROTIME');
◆ testConstructorValidContext()
ilActivationEmitterTest::testConstructorValidContext |
( |
| ) |
|
◆ testEmitActivationValidState()
ilActivationEmitterTest::testEmitActivationValidState |
( |
| ) |
|
Definition at line 114 of file ilActivationEmitterTest.php.
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);
◆ testEmitValidState()
ilActivationEmitterTest::testEmitValidState |
( |
| ) |
|
Definition at line 92 of file ilActivationEmitterTest.php.
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);
◆ testGetContext()
ilActivationEmitterTest::testGetContext |
( |
| ) |
|
Definition at line 58 of file ilActivationEmitterTest.php.
64 $actual = $emitter->getContext();
67 if ($actual === $this->node) {
68 $this->assertEquals($actual, $this->node);
70 $this->assertTrue(
false,
'Context not identical.');
◆ testSetGetTargetDetector()
ilActivationEmitterTest::testSetGetTargetDetector |
( |
| ) |
|
Definition at line 74 of file ilActivationEmitterTest.php.
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);
The documentation for this class was generated from the following file: