ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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
4require_once 'Services/WorkflowEngine/test/ilWorkflowEngineBaseTest.php';
5
13{
14 public function setUp() : void
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}
$parser
Definition: BPMN2Parser.php:23
$parse_result
Definition: BPMN2Parser.php:25
An exception for terminatinating execution or to throw for unit testing.
Class ilWorkflowEngineBaseTest.
$xml
Definition: metadata.php:332