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)
41 $ilSetting->delete(
'IL_PHPUNIT_TEST_TIME' );
42 $ilSetting->delete(
'IL_PHPUNIT_TEST_MICROTIME' );
◆ testConstructorValidContext()
ilSimpleDetectorTest::testConstructorValidContext |
( |
| ) |
|
◆ testGetContext()
ilSimpleDetectorTest::testGetContext |
( |
| ) |
|
Definition at line 124 of file ilSimpleDetectorTest.php.
130 $actual = $detector->getContext();
133 if ($actual === $this->node)
135 $this->assertEquals($actual, $this->node);
137 $this->assertTrue(
false,
'Context not identical.');
◆ testSetDetectorState()
ilSimpleDetectorTest::testSetDetectorState |
( |
| ) |
|
Definition at line 59 of file ilSimpleDetectorTest.php.
65 $workflow->addNode($node);
69 $detector->setDetectorState(
true);
75 if (!$detector->getDetectorState())
80 if ($node->isActive())
89 $this->assertTrue($valid_state,
'Invalid state after setting of detector state.');
◆ testTrigger()
ilSimpleDetectorTest::testTrigger |
( |
| ) |
|
Definition at line 92 of file ilSimpleDetectorTest.php.
98 $workflow->addNode($node);
102 $detector->trigger(null);
107 if (!$detector->getDetectorState())
109 $valid_state =
false;
112 if ($node->isActive())
118 $valid_state =
false;
121 $this->assertTrue($valid_state,
'Invalid state after setting of detector state.');
The documentation for this class was generated from the following file: