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_WorkflowWithSimpleInclusiveGatewayShouldOutputAccordingly()
45 $test_name =
'InclusiveGateway_Simple';
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.');
59 $process =
new $test_name;
60 $this->assertFalse($process->isActive());
62 $process->startWorkflow();
63 $all_triggered =
true;
64 foreach ($process->getNodes() as $node) {
66 foreach ($node->getDetectors() as $detector) {
68 if (!$detector->getActivated()) {
69 $all_triggered =
false;
72 foreach ($node->getEmitters() as $emitter) {
74 if (!$emitter->getActivated()) {
75 $all_triggered =
false;
79 $this->assertTrue($all_triggered);
Class ilWorkflowEngineBaseTest.
getTestInputFilename($test_name)
getTestOutputFilename($test_name)
getTestGoldsampleFilename($test_name)