ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 ()
 

Detailed Description

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

/

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

Member Function Documentation

◆ setUp()

test_002_StartEvent::setUp ( )

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

13 {
14 chdir( dirname( __FILE__ ) );
15 chdir( '../../../../../' );
16
17 require_once './Services/WorkflowEngine/classes/parser/class.ilBPMN2Parser.php';
18 }

◆ test_WorkflowWithBlankStartEventShouldOutputAccordingly()

test_002_StartEvent::test_WorkflowWithBlankStartEventShouldOutputAccordingly ( )

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

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

References $parse_result, and $parser.

◆ test_WorkflowWithMessageStartEventShouldOutputAccordingly()

test_002_StartEvent::test_WorkflowWithMessageStartEventShouldOutputAccordingly ( )

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

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

References $parse_result, and $parser.

◆ test_WorkflowWithMultipleStartEventsShouldOutputAccordingly()

test_002_StartEvent::test_WorkflowWithMultipleStartEventsShouldOutputAccordingly ( )

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

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

References $parse_result, and $parser.

◆ test_WorkflowWithSignalStartEventShouldOutputAccordingly()

test_002_StartEvent::test_WorkflowWithSignalStartEventShouldOutputAccordingly ( )

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

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

References $parse_result, and $parser.

◆ test_WorkflowWithTimerDateStartEventShouldOutputAccordingly()

test_002_StartEvent::test_WorkflowWithTimerDateStartEventShouldOutputAccordingly ( )

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

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

References $parse_result, and $parser.


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