ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.test_001_EmptyWorkflow.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2014 ILIAS open source, Extended GPL, see docs/LICENSE */
3
11{
12 public function setUp()
13 {
14 chdir( dirname( __FILE__ ) );
15 chdir( '../../../../../' );
16
17 require_once './Services/WorkflowEngine/classes/parser/class.ilBPMN2Parser.php';
18 }
19
21 {
22 $xml = file_get_contents('./Services/WorkflowEngine/test/parser/001_EmptyWorkflow/EmptyWorkflow_1.bpmn2');
23 $parser = new ilBPMN2Parser();
24 $parse_result = $parser->parseBPMN2XML($xml);
25
26 $goldsample = file_get_contents('./Services/WorkflowEngine/test/parser/001_EmptyWorkflow/EmptyWorkflow_1_goldsample.php');
27 $this->assertEquals($goldsample, $parse_result, 'Output does not match goldsample.');
28
29 file_put_contents('./Services/WorkflowEngine/test/parser/001_EmptyWorkflow/EmptyWorkflow_1_output.php', $parse_result);
30 $return = exec('php -l ./Services/WorkflowEngine/test/parser/001_EmptyWorkflow/EmptyWorkflow_1_output.php');
31 $this->assertTrue(substr($return,0,25) == 'No syntax errors detected', 'Lint of output code failed.');
32 unlink('./Services/WorkflowEngine/test/parser/001_EmptyWorkflow/EmptyWorkflow_1_output.php');
33 }
34}
$parser
Definition: BPMN2Parser.php:24
$parse_result
Definition: BPMN2Parser.php:26
An exception for terminatinating execution or to throw for unit testing.