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)
41 $ilSetting->delete(
'IL_PHPUNIT_TEST_TIME');
42 $ilSetting->delete(
'IL_PHPUNIT_TEST_MICROTIME');
◆ testConstructorValidContext()
ilActivationEmitterTest::testConstructorValidContext |
( |
| ) |
|
◆ testEmitActivationValidState()
ilActivationEmitterTest::testEmitActivationValidState |
( |
| ) |
|
Definition at line 116 of file ilActivationEmitterTest.php.
119 require_once
'./Services/WorkflowEngine/classes/detectors/class.ilSimpleDetector.php';
123 $target_node->addDetector($foo_detector);
124 $target_node->addDetector($target_detector);
133 $emitter->setTargetDetector($target_detector);
138 $actual = $target_node->isActive();
139 $this->assertTrue($actual);
◆ testEmitValidState()
ilActivationEmitterTest::testEmitValidState |
( |
| ) |
|
Definition at line 94 of file ilActivationEmitterTest.php.
97 require_once
'./Services/WorkflowEngine/classes/detectors/class.ilSimpleDetector.php';
100 $target_node->addDetector($target_detector);
104 $target_node->addDetector($foo_detector);
107 $emitter->setTargetDetector($target_detector);
112 $actual = $target_detector->getDetectorState();
113 $this->assertTrue($actual);
◆ testGetContext()
ilActivationEmitterTest::testGetContext |
( |
| ) |
|
Definition at line 59 of file ilActivationEmitterTest.php.
65 $actual = $emitter->getContext();
68 if ($actual === $this->node)
70 $this->assertEquals($actual, $this->node);
72 $this->assertTrue(
false,
'Context not identical.');
◆ testSetGetTargetDetector()
ilActivationEmitterTest::testSetGetTargetDetector |
( |
| ) |
|
Definition at line 76 of file ilActivationEmitterTest.php.
79 require_once
'./Services/WorkflowEngine/classes/detectors/class.ilSimpleDetector.php';
82 $target_node->addDetector($target_detector);
87 $emitter->setTargetDetector($target_detector);
90 $actual = $emitter->getTargetDetector();
91 $this->assertEquals($target_detector, $actual);
The documentation for this class was generated from the following file: