ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 
4 require_once 'Services/WorkflowEngine/test/ilWorkflowEngineBaseTest.php';
5 
13 {
14  public function setUp()
15  {
16  chdir(dirname(__FILE__));
17  chdir('../../../../../');
18 
19  parent::setUp();
20 
21  require_once './Services/WorkflowEngine/classes/parser/class.ilBPMN2Parser.php';
22  }
23 
25  {
26  $xml = file_get_contents('./Services/WorkflowEngine/test/parser/001_EmptyWorkflow/EmptyWorkflow_1.bpmn2');
27  $parser = new ilBPMN2Parser();
28  $parse_result = $parser->parseBPMN2XML($xml);
29 
30  $goldsample = file_get_contents('./Services/WorkflowEngine/test/parser/001_EmptyWorkflow/EmptyWorkflow_1_goldsample.php');
31  $this->assertEquals($goldsample, $parse_result, 'Output does not match goldsample.');
32 
33  file_put_contents('./Services/WorkflowEngine/test/parser/001_EmptyWorkflow/EmptyWorkflow_1_output.php', $parse_result);
34  $return = exec('php -l ./Services/WorkflowEngine/test/parser/001_EmptyWorkflow/EmptyWorkflow_1_output.php');
35  $this->assertTrue(substr($return, 0, 25) == 'No syntax errors detected', 'Lint of output code failed.');
36  unlink('./Services/WorkflowEngine/test/parser/001_EmptyWorkflow/EmptyWorkflow_1_output.php');
37  }
38 }
Class ilWorkflowEngineBaseTest.
$parse_result
Definition: BPMN2Parser.php:25
$xml
Definition: metadata.php:240
$parser
Definition: BPMN2Parser.php:23
Class ilBPMN2Parser.