ilSettingActivityTest is part of the petri net based workflow engine.
More...
ilSettingActivityTest is part of the petri net based workflow engine.
This class holds all tests for the class activities/class.ilSettingActivity
- Author
- Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
- Version
- $Id$
/
Definition at line 16 of file ilSettingActivityTest.php.
◆ setUp()
ilSettingActivityTest::setUp |
( |
| ) |
|
Definition at line 18 of file ilSettingActivityTest.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';
◆ tearDown()
ilSettingActivityTest::tearDown |
( |
| ) |
|
Definition at line 39 of file ilSettingActivityTest.php.
References $ilSetting.
42 if ($ilSetting != null) {
43 $ilSetting->delete(
'IL_PHPUNIT_TEST_TIME');
44 $ilSetting->delete(
'IL_PHPUNIT_TEST_MICROTIME');
◆ testConstructorValidContext()
ilSettingActivityTest::testConstructorValidContext |
( |
| ) |
|
◆ testExecute()
ilSettingActivityTest::testExecute |
( |
| ) |
|
Definition at line 108 of file ilSettingActivityTest.php.
References $GLOBALS, and array.
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;
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
Create styles array
The data for the language used.
◆ testGetContext()
ilSettingActivityTest::testGetContext |
( |
| ) |
|
Definition at line 131 of file ilSettingActivityTest.php.
137 $actual = $activity->getContext();
140 if ($actual === $this->node) {
141 $this->assertEquals($actual, $this->node);
143 $this->assertTrue(
false,
'Context not identical.');
◆ testSetGetSettingName()
ilSettingActivityTest::testSetGetSettingName |
( |
| ) |
|
Definition at line 61 of file ilSettingActivityTest.php.
67 $expected =
'Günther';
68 $activity->setSettingName($expected);
69 $actual = $activity->getSettingName();
72 $this->assertEquals($actual, $expected);
◆ testSetGetSettingValue()
ilSettingActivityTest::testSetGetSettingValue |
( |
| ) |
|
Definition at line 75 of file ilSettingActivityTest.php.
81 $expected =
'Günther';
82 $activity->setSettingValue($expected);
83 $actual = $activity->getSettingValue();
86 $this->assertEquals($actual, $expected);
◆ testSetSetting()
ilSettingActivityTest::testSetSetting |
( |
| ) |
|
Definition at line 89 of file ilSettingActivityTest.php.
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
The documentation for this class was generated from the following file: