ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
test_002_StartEvent Class Reference
+ Inheritance diagram for test_002_StartEvent:
+ Collaboration diagram for test_002_StartEvent:

Public Member Functions

 setUp ()
 
 test_WorkflowWithBlankStartEventShouldOutputAccordingly ()
 
 test_WorkflowWithMessageStartEventShouldOutputAccordingly ()
 
 test_WorkflowWithSignalStartEventShouldOutputAccordingly ()
 
 test_WorkflowWithTimerDateStartEventShouldOutputAccordingly ()
 
 test_WorkflowWithMultipleStartEventsShouldOutputAccordingly ()
 

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_002_StartEvent.php.

Member Function Documentation

◆ setUp()

test_002_StartEvent::setUp ( )

Definition at line 14 of file class.test_002_StartEvent.php.

15  {
16  chdir(dirname(__FILE__));
17  chdir('../../../../../');
18 
19  parent::setUp();
20 
21  require_once './Services/WorkflowEngine/classes/parser/class.ilBPMN2Parser.php';
22  }

◆ test_WorkflowWithBlankStartEventShouldOutputAccordingly()

test_002_StartEvent::test_WorkflowWithBlankStartEventShouldOutputAccordingly ( )

Definition at line 24 of file class.test_002_StartEvent.php.

References $parse_result, $parser, and $xml.

25  {
26  $xml = file_get_contents('./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Blank.bpmn2');
27  $parser = new ilBPMN2Parser();
28  $parse_result = $parser->parseBPMN2XML($xml);
29 
30  file_put_contents('./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Blank_output.php', $parse_result);
31  $return = exec('php -l ./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Blank_output.php');
32  $this->assertTrue(substr($return, 0, 25) == 'No syntax errors detected', 'Lint of output code failed.');
33 
34 
35  $goldsample = file_get_contents('./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Blank_goldsample.php');
36  $this->assertEquals($goldsample, $parse_result, 'Output does not match goldsample.');
37 
38  require_once './Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Blank_output.php';
39  $process = new StartEvent_Blank();
40  $this->assertFalse($process->isActive());
41 
42  // Here I would start the workflow, but that leads to saving it to the database which is currently not supported.
43 
44  unlink('./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Blank_output.php');
45  }
$parse_result
Definition: BPMN2Parser.php:25
$parser
Definition: BPMN2Parser.php:23
Class ilBPMN2Parser.

◆ test_WorkflowWithMessageStartEventShouldOutputAccordingly()

test_002_StartEvent::test_WorkflowWithMessageStartEventShouldOutputAccordingly ( )

Definition at line 47 of file class.test_002_StartEvent.php.

References $parse_result, $parser, and $xml.

48  {
49  $xml = file_get_contents('./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Message.bpmn2');
50  $parser = new ilBPMN2Parser();
51  $parse_result = $parser->parseBPMN2XML($xml);
52 
53  file_put_contents('./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Message_output.php', $parse_result);
54  $return = exec('php -l ./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Message_output.php');
55  $this->assertTrue(substr($return, 0, 25) == 'No syntax errors detected', 'Lint of output code failed.');
56 
57 
58  $goldsample = file_get_contents('./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Message_goldsample.php');
59  $this->assertEquals($goldsample, $parse_result, 'Output does not match goldsample.');
60 
61  require_once './Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Message_output.php';
62  $process = new StartEvent_Message();
63  $this->assertFalse($process->isActive());
64 
65  unlink('./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Message_output.php');
66  }
$parse_result
Definition: BPMN2Parser.php:25
$parser
Definition: BPMN2Parser.php:23
Class ilBPMN2Parser.

◆ test_WorkflowWithMultipleStartEventsShouldOutputAccordingly()

test_002_StartEvent::test_WorkflowWithMultipleStartEventsShouldOutputAccordingly ( )

Definition at line 108 of file class.test_002_StartEvent.php.

References $parse_result, $parser, and $xml.

109  {
110  $xml = file_get_contents('./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_MultiStart.bpmn2');
111  $parser = new ilBPMN2Parser();
112  $parse_result = $parser->parseBPMN2XML($xml);
113 
114  file_put_contents('./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_MultiStart_output.php', $parse_result);
115  $return = exec('php -l ./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_MultiStart_output.php');
116  $this->assertTrue(substr($return, 0, 25) == 'No syntax errors detected', 'Lint of output code failed.');
117 
118  $goldsample = file_get_contents('./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_MultiStart_goldsample.php');
119  $this->assertEquals($goldsample, $parse_result, 'Output does not match goldsample.');
120 
121  require_once './Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_MultiStart_output.php';
122  $process = new StartEvent_Multistart();
123  $this->assertFalse($process->isActive());
124 
125  unlink('./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_MultiStart_output.php');
126  }
$parse_result
Definition: BPMN2Parser.php:25
$parser
Definition: BPMN2Parser.php:23
Class ilBPMN2Parser.

◆ test_WorkflowWithSignalStartEventShouldOutputAccordingly()

test_002_StartEvent::test_WorkflowWithSignalStartEventShouldOutputAccordingly ( )

Definition at line 68 of file class.test_002_StartEvent.php.

References $parse_result, $parser, and $xml.

69  {
70  $xml = file_get_contents('./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Signal.bpmn2');
71  $parser = new ilBPMN2Parser();
72  $parse_result = $parser->parseBPMN2XML($xml);
73 
74  file_put_contents('./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Signal_output.php', $parse_result);
75  $return = exec('php -l ./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Signal_output.php');
76  $this->assertTrue(substr($return, 0, 25) == 'No syntax errors detected', 'Lint of output code failed.');
77 
78  $goldsample = file_get_contents('./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Signal_goldsample.php');
79  $this->assertEquals($goldsample, $parse_result, 'Output does not match goldsample.');
80 
81  require_once './Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Signal_output.php';
82  $process = new StartEvent_Signal();
83  $this->assertFalse($process->isActive());
84 
85  unlink('./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Signal_output.php');
86  }
$parse_result
Definition: BPMN2Parser.php:25
$parser
Definition: BPMN2Parser.php:23
Class ilBPMN2Parser.

◆ test_WorkflowWithTimerDateStartEventShouldOutputAccordingly()

test_002_StartEvent::test_WorkflowWithTimerDateStartEventShouldOutputAccordingly ( )

Definition at line 88 of file class.test_002_StartEvent.php.

References $parse_result, $parser, and $xml.

89  {
90  $xml = file_get_contents('./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Timer_Date.bpmn2');
91  $parser = new ilBPMN2Parser();
92  $parse_result = $parser->parseBPMN2XML($xml);
93 
94  file_put_contents('./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Timer_Date_output.php', $parse_result);
95  $return = exec('php -l ./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Timer_Date_output.php');
96  $this->assertTrue(substr($return, 0, 25) == 'No syntax errors detected', 'Lint of output code failed.');
97 
98  $goldsample = file_get_contents('./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Timer_Date_goldsample.php');
99  $this->assertEquals($goldsample, $parse_result, 'Output does not match goldsample.');
100 
101  require_once './Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Timer_Date_output.php';
102  $process = new StartEvent_Timer_Date();
103  $this->assertFalse($process->isActive());
104 
105  unlink('./Services/WorkflowEngine/test/parser/002_StartEvent/StartEvent_Timer_Date_output.php');
106  }
$parse_result
Definition: BPMN2Parser.php:25
$parser
Definition: BPMN2Parser.php:23
Class ilBPMN2Parser.

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