ilDataEmitterTest is part of the petri net based workflow engine.
More...
ilDataEmitterTest is part of the petri net based workflow engine.
This class holds all tests for the class emitters/class.ilDataEmitter
- Author
- Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
- Version
- $Id$
/
Definition at line 15 of file ilDataEmitterTest.php.
◆ setUp()
ilDataEmitterTest::setUp |
( |
| ) |
|
Definition at line 17 of file ilDataEmitterTest.php.
18 {
19 include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
20
21
22
23 require_once './Services/WorkflowEngine/classes/workflows/class.ilEmptyWorkflow.php';
25
26
27 require_once './Services/WorkflowEngine/classes/nodes/class.ilBasicNode.php';
29
30
31 $this->workflow->addNode($this->node);
32
33 require_once './Services/WorkflowEngine/classes/emitters/class.ilDataEmitter.php';
34 }
@noinspection PhpIncludeInspection
@noinspection PhpIncludeInspection
◆ tearDown()
ilDataEmitterTest::tearDown |
( |
| ) |
|
◆ testConstructorValidContext()
ilDataEmitterTest::testConstructorValidContext |
( |
| ) |
|
Definition at line 47 of file ilDataEmitterTest.php.
48 {
49
51
52
53
54 $this->assertTrue(
55 true,
56 'Construction failed with valid context passed to constructor.'
57 );
58 }
@noinspection PhpIncludeInspection
◆ testEmitValidState()
ilDataEmitterTest::testEmitValidState |
( |
| ) |
|
Definition at line 95 of file ilDataEmitterTest.php.
96 {
97
98 require_once './Services/WorkflowEngine/classes/detectors/class.ilSimpleDetector.php';
101 $target_node->addDetector($target_detector);
102
104 $emitter->setTargetDetector($target_detector);
105
106
107 $emitter->emit();
108
109 $actual = $target_detector->getDetectorState();
110 $this->assertTrue($actual);
111 }
@noinspection PhpIncludeInspection
◆ testGetContext()
ilDataEmitterTest::testGetContext |
( |
| ) |
|
Definition at line 60 of file ilDataEmitterTest.php.
61 {
62
64
65
66 $actual = $emitter->getContext();
67
68
69 if ($actual === $this->node)
70 {
71 $this->assertEquals($actual, $this->node);
72 } else {
73 $this->assertTrue(false, 'Context not identical.');
74 }
75 }
◆ testSetGetTargetDetector()
ilDataEmitterTest::testSetGetTargetDetector |
( |
| ) |
|
Definition at line 77 of file ilDataEmitterTest.php.
78 {
79
80 require_once './Services/WorkflowEngine/classes/detectors/class.ilSimpleDetector.php';
83 $target_node->addDetector($target_detector);
84
86
87
88 $emitter->setTargetDetector($target_detector);
89
90
91 $actual = $emitter->getTargetDetector();
92 $this->assertEquals($target_detector, $actual);
93 }
The documentation for this class was generated from the following file: