ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
test_case_01 Class Reference
+ Inheritance diagram for test_case_01:
+ Collaboration diagram for test_case_01:

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 = 'case_01/'
 

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

Member Function Documentation

◆ getTestGoldsampleFilename()

test_case_01::getTestGoldsampleFilename (   $test_name)

Definition at line 28 of file class.test_case_01.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_case_01::getTestInputFilename (   $test_name)

Definition at line 18 of file class.test_case_01.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_case_01::getTestOutputFilename (   $test_name)

Definition at line 23 of file class.test_case_01.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_case_01::setUp ( )

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

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

◆ test_WorkflowWithSimpleEndEventShouldOutputAccordingly()

test_case_01::test_WorkflowWithSimpleEndEventShouldOutputAccordingly ( )

Definition at line 41 of file class.test_case_01.php.

42 {
43 $test_name = 'Booking_System_FullDiagram';
44 $xml = file_get_contents($this->getTestInputFilename($test_name));
45 $parser = new ilBPMN2Parser();
46 $parse_result = $parser->parseBPMN2XML($xml);
47
48 file_put_contents($this->getTestOutputFilename($test_name), $parse_result);
49 $return = exec('php -l ' . $this->getTestOutputFilename($test_name));
50
51 $this->assertTrue(substr($return, 0, 25) == 'No syntax errors detected', 'Lint of output code failed.');
52
53 $goldsample = file_get_contents($this->getTestGoldsampleFilename($test_name));
54 //$this->assertEquals($goldsample, $parse_result, 'Output does not match goldsample.');
55 // Disarmed due to whitespace-issues.
56
57 require_once $this->getTestOutputFilename($test_name);
58 $process = new $test_name;
59 $this->assertFalse($process->isActive());
60
61 unlink($this->getTestOutputFilename($test_name));
62 }
$parser
Definition: BPMN2Parser.php:23
$parse_result
Definition: BPMN2Parser.php:25
getTestGoldsampleFilename($test_name)
getTestInputFilename($test_name)
getTestOutputFilename($test_name)
$xml
Definition: metadata.php:332

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

+ Here is the call graph for this function:

Field Documentation

◆ $base_path

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

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

◆ $suite_path

test_case_01::$suite_path = 'case_01/'

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


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