24 chdir(dirname(__FILE__));
25 chdir(
'../../../../');
28 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
31 if (!defined(
'IL_PHPUNIT_TEST')) {
32 define(
'IL_PHPUNIT_TEST',
false);
37 require_once
'./Services/WorkflowEngine/classes/workflows/class.ilEmptyWorkflow.php';
41 require_once
'./Services/WorkflowEngine/classes/nodes/class.ilBasicNode.php';
45 $this->workflow->addNode($this->node);
47 require_once
'./Services/WorkflowEngine/classes/activities/class.ilEventRaisingActivity.php';
49 $this->test_dir = vfs\vfsStream::setup(
'example');
55 if ($ilSetting != null) {
70 'Construction failed with valid context passed to constructor.' 78 $expected =
'HokusPokus';
81 $activity->setEventName($expected);
82 $actual = $activity->getEventName();
87 'Retrieved EventName differs from input value.' 95 $expected =
'HokusPokus';
98 $activity->setEventType($expected);
99 $actual = $activity->getEventType();
104 'Retrieved EventType differs from input value.' 114 $actual = $activity->getContext();
117 if ($actual === $this->node) {
118 $this->assertEquals($actual, $this->node);
120 $this->assertTrue(
false,
'Context not identical.');
130 $expected[] = array(
'key' => $key,
'value' => $value);
131 $expected[] = array(
'key' =>
'context',
'value' => $activity);
134 $activity->addFixedParam($key, $value);
135 $params = $activity->getParamsArray();
138 $this->assertEquals($expected, $params);
151 $expected[] = array(
'key' => $key1,
'value' => $value1);
152 $expected[] = array(
'key' => $key2,
'value' => $value2);
153 $expected[] = array(
'key' => $key3,
'value' => $value3);
154 $expected[] = array(
'key' =>
'context',
'value' => $activity);
157 $activity->addFixedParam($key1, $value1);
158 $activity->addFixedParam($key2, $value2);
159 $activity->addFixedParam($key3, $value3);
160 $params = $activity->getParamsArray();
163 $this->assertEquals($expected, $params);
testConstructorValidContext()
testSetGetFixedParamsMultiplePairs()
$test_dir
vfsStream Test Directory, see setup.
testSetGetFixedParamsSinglePair()
testSetGetEventTypeShouldReturnSetValue()
ilEventRaisingActivityTest is part of the workflow engine.
testSetGetEventNameShouldReturnSetValue()