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_WorkflowWithSimpleEndEventShouldOutputAccordingly()
45 $this->markTestSkipped();
46 $test_name =
'DataOutput_Simple';
54 $this->assertTrue(substr($return, 0, 25) ==
'No syntax errors detected',
'Lint of output code failed.');
57 $this->assertEquals($goldsample,
$parse_result,
'Output does not match goldsample.');
61 $process =
new $test_name;
62 $process->writeOutputVar(
'DataOutput_1',
'YaddaYadda');
63 $process->startWorkflow();
64 $all_triggered =
true;
65 foreach ($process->getNodes() as $node) {
67 foreach ($node->getDetectors() as $detector) {
69 if (!$detector->getActivated()) {
70 $all_triggered =
false;
73 foreach ($node->getEmitters() as $emitter) {
75 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.');
Class ilWorkflowEngineBaseTest.
getTestGoldsampleFilename($test_name)
getTestOutputFilename($test_name)
getTestInputFilename($test_name)