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_WorkflowWithSimpleEndEventShouldOutputAccordingly()
41 $test_name =
'DataOutput_Simple';
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->writeOutputVar(
'DataOutput_1',
'YaddaYadda');
58 $process->startWorkflow();
59 $all_triggered =
true;
60 foreach($process->getNodes() as $node)
63 foreach($node->getDetectors() as $detector)
66 if(!$detector->getActivated())
68 $all_triggered =
false;
71 foreach($node->getEmitters() as $emitter)
74 if(!$emitter->getActivated())
76 $all_triggered =
false;
80 $this->assertEquals($process->getOutputVars(),
array(0 =>
'DataOutput_1',
'DataOutput_1' =>
'YaddaYadda'),
'Outputvar was not kept.');
81 $this->assertTrue($all_triggered,
'Not all nodes were triggered.');
getTestGoldsampleFilename($test_name)
Create styles array
The data for the language used.
getTestOutputFilename($test_name)
getTestInputFilename($test_name)