18 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
22 require_once
'./Services/WorkflowEngine/classes/workflows/class.ilEmptyWorkflow.php';
26 require_once
'./Services/WorkflowEngine/classes/nodes/class.ilBasicNode.php';
30 $this->workflow->addNode($this->node);
32 require_once
'./Services/WorkflowEngine/classes/activities/class.ilSettingActivity.php';
38 if($ilSetting != null)
40 $ilSetting->delete(
'IL_PHPUNIT_TEST_TIME' );
41 $ilSetting->delete(
'IL_PHPUNIT_TEST_MICROTIME' );
54 'Construction failed with valid context passed to constructor.' 64 $expected =
'Günther';
65 $activity->setSettingName($expected);
66 $actual = $activity->getSettingName();
69 $this->assertEquals($actual, $expected);
78 $expected =
'Günther';
79 $activity->setSettingValue($expected);
80 $actual = $activity->getSettingValue();
83 $this->assertEquals($actual, $expected);
92 $expected_name =
'Ralle';
93 $expected_value =
'OK';
94 $activity->setSetting($expected_name, $expected_value);
95 $actual_name = $activity->getSettingName();
96 $actual_value = $activity->getSettingValue();
100 $actual_name.$actual_value,
101 $expected_name.$expected_value
109 $expected_name =
'Ralle';
110 $expected_val =
'OK';
111 $activity->setSetting($expected_name, $expected_val);
113 require_once
'./Services/Administration/classes/class.ilSetting.php';
114 $ilSetting_mock = $this->getMock(
'ilSetting',
array(
'set'),
array(),
'', FALSE);
116 $ilSetting_mock->expects($this->exactly(1))
118 ->with($expected_name, $expected_val);
119 $stashed_real_object = @
$GLOBALS[
'ilSetting'];
120 $GLOBALS[
'ilSetting'] = $ilSetting_mock;
123 $activity->execute();
125 $GLOBALS[
'ilSetting'] = $stashed_real_object;
135 $actual = $activity->getContext();
138 if ($actual === $this->node)
140 $this->assertEquals($actual, $this->node);
142 $this->assertTrue(
false,
'Context not identical.');
ilSettingActivityTest is part of the petri net based workflow engine.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
testConstructorValidContext()
Create styles array
The data for the language used.