23 chdir(dirname(__FILE__));
24 chdir(
'../../../../');
27 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
30 if (!defined(
'IL_PHPUNIT_TEST')) {
31 define(
'IL_PHPUNIT_TEST',
false);
36 require_once
'./Services/WorkflowEngine/classes/workflows/class.ilEmptyWorkflow.php';
40 require_once
'./Services/WorkflowEngine/classes/nodes/class.ilBasicNode.php';
44 $this->workflow->addNode($this->node);
46 require_once
'./Services/WorkflowEngine/classes/activities/class.ilEventRaisingActivity.php';
48 $this->test_dir = vfs\vfsStream::setup(
'example');
54 if ($ilSetting != null) {
69 'Construction failed with valid context passed to constructor.' 77 $expected =
'HokusPokus';
80 $activity->setEventName($expected);
81 $actual = $activity->getEventName();
86 'Retrieved EventName differs from input value.' 94 $expected =
'HokusPokus';
97 $activity->setEventType($expected);
98 $actual = $activity->getEventType();
103 'Retrieved EventType differs from input value.' 113 $actual = $activity->getContext();
116 if ($actual === $this->node) {
117 $this->assertEquals($actual, $this->node);
119 $this->assertTrue(
false,
'Context not identical.');
129 $expected[] = array(
'key' =>
$key,
'value' => $value);
130 $expected[] = array(
'key' =>
'context',
'value' => $activity);
133 $activity->addFixedParam(
$key, $value);
134 $params = $activity->getParamsArray();
137 $this->assertEquals($expected,
$params);
150 $expected[] = array(
'key' => $key1,
'value' => $value1);
151 $expected[] = array(
'key' => $key2,
'value' => $value2);
152 $expected[] = array(
'key' => $key3,
'value' => $value3);
153 $expected[] = array(
'key' =>
'context',
'value' => $activity);
156 $activity->addFixedParam($key1, $value1);
157 $activity->addFixedParam($key2, $value2);
158 $activity->addFixedParam($key3, $value3);
159 $params = $activity->getParamsArray();
162 $this->assertEquals($expected,
$params);
testConstructorValidContext()
testSetGetFixedParamsMultiplePairs()
$test_dir
vfsStream Test Directory, see setup.
testSetGetFixedParamsSinglePair()
testSetGetEventTypeShouldReturnSetValue()
ilEventRaisingActivityTest is part of the workflow engine.
testSetGetEventNameShouldReturnSetValue()