4 require_once
'Services/WorkflowEngine/test/ilWorkflowEngineBaseTest.php';
22 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
26 require_once
'./Services/WorkflowEngine/classes/workflows/class.ilEmptyWorkflow.php';
30 require_once
'./Services/WorkflowEngine/classes/nodes/class.ilBasicNode.php';
34 $this->workflow->addNode($this->node);
36 require_once
'./Services/WorkflowEngine/classes/activities/class.ilSettingActivity.php';
42 if ($ilSetting != null) {
43 $ilSetting->delete(
'IL_PHPUNIT_TEST_TIME');
44 $ilSetting->delete(
'IL_PHPUNIT_TEST_MICROTIME');
57 'Construction failed with valid context passed to constructor.' 67 $expected =
'Günther';
68 $activity->setSettingName($expected);
69 $actual = $activity->getSettingName();
72 $this->assertEquals($actual, $expected);
81 $expected =
'Günther';
82 $activity->setSettingValue($expected);
83 $actual = $activity->getSettingValue();
86 $this->assertEquals($actual, $expected);
95 $expected_name =
'Ralle';
96 $expected_value =
'OK';
97 $activity->setSetting($expected_name, $expected_value);
98 $actual_name = $activity->getSettingName();
99 $actual_value = $activity->getSettingValue();
103 $actual_name . $actual_value,
104 $expected_name . $expected_value
112 $expected_name =
'Ralle';
113 $expected_val =
'OK';
114 $activity->setSetting($expected_name, $expected_val);
116 require_once
'./Services/Administration/classes/class.ilSetting.php';
117 $ilSetting_mock = $this->createMock(
'ilSetting', array(
'set'), array(),
'',
false);
119 $ilSetting_mock->expects($this->exactly(1))
121 ->with($expected_name, $expected_val);
122 $stashed_real_object = @
$GLOBALS[
'ilSetting'];
123 $GLOBALS[
'ilSetting'] = $ilSetting_mock;
126 $activity->execute();
128 $GLOBALS[
'ilSetting'] = $stashed_real_object;
137 $actual = $activity->getContext();
140 if ($actual === $this->node) {
141 $this->assertEquals($actual, $this->node);
143 $this->assertTrue(
false,
'Context not identical.');
Class ilWorkflowEngineBaseTest.
ilSettingActivityTest is part of the petri net based workflow engine.
testConstructorValidContext()
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.