ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
test_010_ComplexGateway Class Reference
+ Inheritance diagram for test_010_ComplexGateway:
+ Collaboration diagram for test_010_ComplexGateway:

Public Member Functions

 getTestInputFilename ($test_name)
 
 getTestOutputFilename ($test_name)
 
 getTestGoldsampleFilename ($test_name)
 
 setUp ()
 
 test_WorkflowWithSimpleEndEventShouldOutputAccordingly ()
 

Data Fields

 $base_path = './Services/WorkflowEngine/test/parser/'
 
 $suite_path = '010_ComplexGateway/'
 

Additional Inherited Members

- Protected Member Functions inherited from ilWorkflowEngineBaseTest
 setGlobalVariable ($name, $value)
 
 setUp ()
 

Detailed Description

Author
Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

/

Definition at line 12 of file class.test_010_ComplexGateway.php.

Member Function Documentation

◆ getTestGoldsampleFilename()

test_010_ComplexGateway::getTestGoldsampleFilename (   $test_name)

Definition at line 28 of file class.test_010_ComplexGateway.php.

29 {
30 return $this->base_path . $this->suite_path . $test_name . '_goldsample.php';
31 }

Referenced by test_WorkflowWithSimpleEndEventShouldOutputAccordingly().

+ Here is the caller graph for this function:

◆ getTestInputFilename()

test_010_ComplexGateway::getTestInputFilename (   $test_name)

Definition at line 18 of file class.test_010_ComplexGateway.php.

19 {
20 return $this->base_path . $this->suite_path . $test_name . '.bpmn2';
21 }

Referenced by test_WorkflowWithSimpleEndEventShouldOutputAccordingly().

+ Here is the caller graph for this function:

◆ getTestOutputFilename()

test_010_ComplexGateway::getTestOutputFilename (   $test_name)

Definition at line 23 of file class.test_010_ComplexGateway.php.

24 {
25 return $this->base_path . $this->suite_path . $test_name . '_output.php';
26 }

Referenced by test_WorkflowWithSimpleEndEventShouldOutputAccordingly().

+ Here is the caller graph for this function:

◆ setUp()

test_010_ComplexGateway::setUp ( )

Reimplemented from ilWorkflowEngineBaseTest.

Definition at line 33 of file class.test_010_ComplexGateway.php.

34 {
35 chdir(dirname(__FILE__));
36 chdir('../../../../../');
37
38 parent::setUp();
39
40 require_once './Services/WorkflowEngine/classes/parser/class.ilBPMN2Parser.php';
41 }

◆ test_WorkflowWithSimpleEndEventShouldOutputAccordingly()

test_010_ComplexGateway::test_WorkflowWithSimpleEndEventShouldOutputAccordingly ( )

Definition at line 43 of file class.test_010_ComplexGateway.php.

44 {
45 $this->markTestIncomplete('The complex gateway has conceptual issues. Proper modeling of a default outgoing
46 sequence flows seems to be impossible with available modelling tools. Once this is resolved, testing makes
47 sense, not before.');
48 // TODO: Resolve conceptual issues.
49
50 $test_name = 'ComplexGateway_Blanko_Simple';
51 $xml = file_get_contents($this->getTestInputFilename($test_name));
52 $parser = new ilBPMN2Parser();
53 $parse_result = $parser->parseBPMN2XML($xml);
54
55 file_put_contents($this->getTestOutputFilename($test_name), $parse_result);
56 $return = exec('php -l ' . $this->getTestOutputFilename($test_name));
57
58 $this->assertTrue(substr($return, 0, 25) == 'No syntax errors detected', 'Lint of output code failed.');
59
60 $goldsample = file_get_contents($this->getTestGoldsampleFilename($test_name));
61 $this->assertEquals($goldsample, $parse_result, 'Output does not match goldsample.');
62
63 require_once $this->getTestOutputFilename($test_name);
64 $process = new $test_name;
65 $this->assertFalse($process->isActive());
66
67 unlink($this->getTestOutputFilename($test_name));
68 }
$parser
Definition: BPMN2Parser.php:23
$parse_result
Definition: BPMN2Parser.php:25
$xml
Definition: metadata.php:240

References $parse_result, $parser, $xml, getTestGoldsampleFilename(), getTestInputFilename(), and getTestOutputFilename().

+ Here is the call graph for this function:

Field Documentation

◆ $base_path

test_010_ComplexGateway::$base_path = './Services/WorkflowEngine/test/parser/'

Definition at line 15 of file class.test_010_ComplexGateway.php.

◆ $suite_path

test_010_ComplexGateway::$suite_path = '010_ComplexGateway/'

Definition at line 16 of file class.test_010_ComplexGateway.php.


The documentation for this class was generated from the following file: