19 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
23 require_once
'./Services/WorkflowEngine/classes/workflows/class.ilEmptyWorkflow.php';
27 require_once
'./Services/WorkflowEngine/classes/nodes/class.ilBasicNode.php';
31 $this->workflow->addNode($this->node);
33 require_once
'./Services/WorkflowEngine/classes/activities/class.ilStaticMethodCallActivity.php';
39 if ($ilSetting != NULL)
41 $ilSetting->delete(
'IL_PHPUNIT_TEST_TIME');
42 $ilSetting->delete(
'IL_PHPUNIT_TEST_MICROTIME');
55 'Construction failed with valid context passed to constructor.' 63 $expected =
'Services/WorkflowEngine/classes/utils/class.ilWorkflowUtils.php';
66 $activity->setIncludeFilename($expected);
67 $actual = $activity->getIncludeFilename();
70 $this->assertEquals($actual, $expected);
77 $expected =
'ilWorkflowUtils::targetMethod';
80 $activity->setClassAndMethodName($expected);
81 $actual = $activity->getClassAndMethodName();
84 $this->assertEquals($actual, $expected);
91 $expected =
array(
'homer',
'marge',
'bart',
'lisa',
'maggy');
94 $activity->setParameters($expected);
95 $actual = $activity->getParameters();
98 $this->assertEquals($actual, $expected);
105 $file =
'Services/WorkflowEngine/test/activities/ilStaticMethodCallActivityTest.php';
106 $class_and_method =
'ilStaticMethodCallActivityTest::executionTargetMethod';
107 $parameters =
array(
'homer',
'marge',
'bart',
'lisa',
'maggy');
110 $activity->setIncludeFilename(
$file);
111 $activity->setClassAndMethodName($class_and_method);
112 $activity->setParameters($parameters);
113 $activity->execute();
116 $this->assertTrue(
true,
'There dont seem to be problems here.');
121 $parameters =
array(
'homer' =>
'homer',
'marge' =>
'marge',
'bart' =>
'bart',
'lisa' =>
'lisa',
'maggy' =>
'maggy');
123 if ($context == null)
125 throw new Exception(
'Something went wrong with the context.');
128 if ($param[0] != $parameters)
130 throw new Exception(
'Something went wrong with the parameters.');
142 $actual = $activity->getContext();
145 if ($actual === $this->node)
147 $this->assertEquals($actual, $this->node);
149 $this->assertTrue(
false,
'Context not identical.');
static executionTargetMethod($context, $param)
ilStaticMethodCallActivityTest is part of the petri net based workflow engine.
testConstructorValidContext()
testSetGetIncludeFilename()
testSetGetClassAndMethodName()
Create styles array
The data for the language used.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file