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_WorkflowWithSimpleInclusiveGatewayShouldOutputAccordingly()
41 $test_name =
'InclusiveGateway_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.');
55 $process =
new $test_name;
56 $this->assertFalse($process->isActive());
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->assertTrue($all_triggered);
getTestInputFilename($test_name)
getTestOutputFilename($test_name)
getTestGoldsampleFilename($test_name)