ilSimpleDetectorTest is part of the petri net based workflow engine.
More...
ilSimpleDetectorTest is part of the petri net based workflow engine.
This class holds all tests for the class detectors/class.ilSimpleDetector
- Author
- Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
- Version
- $Id$
/
Definition at line 15 of file ilSimpleDetectorTest.php.
◆ setUp()
ilSimpleDetectorTest::setUp |
( |
| ) |
|
Definition at line 17 of file ilSimpleDetectorTest.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/detectors/class.ilSimpleDetector.php';
◆ tearDown()
ilSimpleDetectorTest::tearDown |
( |
| ) |
|
Definition at line 36 of file ilSimpleDetectorTest.php.
References $ilSetting.
39 if ($ilSetting != null) {
40 $ilSetting->delete(
'IL_PHPUNIT_TEST_TIME');
41 $ilSetting->delete(
'IL_PHPUNIT_TEST_MICROTIME');
◆ testConstructorValidContext()
ilSimpleDetectorTest::testConstructorValidContext |
( |
| ) |
|
◆ testGetContext()
ilSimpleDetectorTest::testGetContext |
( |
| ) |
|
Definition at line 119 of file ilSimpleDetectorTest.php.
125 $actual = $detector->getContext();
128 if ($actual === $this->node) {
129 $this->assertEquals($actual, $this->node);
131 $this->assertTrue(
false,
'Context not identical.');
◆ testSetDetectorState()
ilSimpleDetectorTest::testSetDetectorState |
( |
| ) |
|
Definition at line 58 of file ilSimpleDetectorTest.php.
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.');
◆ testTrigger()
ilSimpleDetectorTest::testTrigger |
( |
| ) |
|
Definition at line 89 of file ilSimpleDetectorTest.php.
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.');
The documentation for this class was generated from the following file: