4 require_once
'Services/WorkflowEngine/test/ilWorkflowEngineBaseTest.php';
15 public $base_path =
'./Services/WorkflowEngine/test/parser/';
20 return $this->base_path . $this->suite_path . $test_name .
'.bpmn2';
25 return $this->base_path . $this->suite_path . $test_name .
'_output.php';
30 return $this->base_path . $this->suite_path . $test_name .
'_goldsample.php';
35 chdir(dirname(__FILE__));
36 chdir(
'../../../../../');
40 require_once
'./Services/WorkflowEngine/classes/parser/class.ilBPMN2Parser.php';
43 public function test_WorkflowWithInputTaskWiredDataIOShouldOutputAccordingly()
45 $test_name =
'Data_Wiring_Input_Task';
53 $this->assertTrue(substr($return, 0, 25) ==
'No syntax errors detected',
'Lint of output code failed.');
56 $this->assertEquals($goldsample,
$parse_result,
'Output does not match goldsample.');
60 $process =
new $test_name;
61 $process->setInstanceVarById(
'DataInput_1', 234);
62 $process->startWorkflow();
64 foreach ($process->getNodes() as $node) {
65 if ($node->getName() ==
'$_v_Task_1') {
66 $runtime_vars = $node->getRuntimeVars();
69 $this->assertEquals(234, $runtime_vars[
'user_id'],
'IO data was not forwarded from input to task runtime var.');
70 $this->assertEquals(234, $process->getInstanceVarById(
'DataInput_1'),
'IO data was not kept as input var.');
75 public function test_WorkflowWithInputObjectOutputWiredDataIOShouldOutputAccordingly()
77 $test_name =
'DataObject_Wiring_Input_Object_Output';
85 $this->assertTrue(substr($return, 0, 25) ==
'No syntax errors detected',
'Lint of output code failed.');
88 $this->assertEquals($goldsample,
$parse_result,
'Output does not match goldsample.');
92 $process =
new $test_name;
93 $process->setInstanceVarById(
'DataInput_1',
'YaddaYadda');
94 $process->startWorkflow();
Class ilWorkflowEngineBaseTest.
getTestOutputFilename($test_name)
getTestGoldsampleFilename($test_name)
getTestInputFilename($test_name)