13 public $base_path =
'./Services/WorkflowEngine/test/parser/';
18 return $this->base_path . $this->suite_path . $test_name .
'.bpmn2';
23 return $this->base_path . $this->suite_path . $test_name .
'_output.php';
28 return $this->base_path . $this->suite_path . $test_name .
'_goldsample.php';
33 chdir( dirname( __FILE__ ) );
34 chdir(
'../../../../../' );
36 require_once
'./Services/WorkflowEngine/classes/parser/class.ilBPMN2Parser.php';
39 public function test_WorkflowWithInputTaskWiredDataIOShouldOutputAccordingly()
41 $test_name =
'Data_Wiring_Input_Task';
49 $this->assertTrue(substr($return,0,25) ==
'No syntax errors detected',
'Lint of output code failed.');
52 $this->assertEquals($goldsample,
$parse_result,
'Output does not match goldsample.');
56 $process =
new $test_name;
57 $process->setInstanceVarById(
'DataInput_1', 234);
58 $process->startWorkflow();
60 foreach($process->getNodes() as $node)
62 if($node->getName() ==
'$_v_Task_1')
64 $runtime_vars = $node->getRuntimeVars();
67 $this->assertEquals(234, $runtime_vars[
'user_id'],
'IO data was not forwarded from input to task runtime var.');
68 $this->assertEquals(234, $process->getInstanceVarById(
'DataInput_1'),
'IO data was not kept as input var.');
73 public function test_WorkflowWithInputObjectOutputWiredDataIOShouldOutputAccordingly()
75 $test_name =
'DataObject_Wiring_Input_Object_Output';
83 $this->assertTrue(substr($return,0,25) ==
'No syntax errors detected',
'Lint of output code failed.');
86 $this->assertEquals($goldsample,
$parse_result,
'Output does not match goldsample.');
90 $process =
new $test_name;
91 $process->setInstanceVarById(
'DataInput_1',
'YaddaYadda');
92 $process->startWorkflow();
getTestOutputFilename($test_name)
getTestGoldsampleFilename($test_name)
getTestInputFilename($test_name)