dumper = new StateMachineGraphvizDumper(); } public function testDumpWithoutMarking() { $definition = $this->createComplexStateMachineDefinition(); $dump = $this->dumper->dump($definition); $expected = <<<'EOGRAPH' digraph workflow { ratio="compress" rankdir="LR" node [fontsize="9" fontname="Arial" color="#333333" fillcolor="lightblue" fixedsize="1" width="1"]; edge [fontsize="9" fontname="Arial" color="#333333" arrowhead="normal" arrowsize="0.5"]; place_a [label="a", shape=circle, style="filled"]; place_b [label="b", shape=circle]; place_c [label="c", shape=circle]; place_d [label="d", shape=circle]; place_a -> place_b [label="t1" style="solid"]; place_d -> place_b [label="t1" style="solid"]; place_b -> place_c [label="t2" style="solid"]; place_b -> place_d [label="t3" style="solid"]; } EOGRAPH; $this->assertEquals($expected, $dump); } public function testDumpWithMarking() { $definition = $this->createComplexStateMachineDefinition(); $marking = new Marking(array('b' => 1)); $expected = <<<'EOGRAPH' digraph workflow { ratio="compress" rankdir="LR" node [fontsize="9" fontname="Arial" color="#333333" fillcolor="lightblue" fixedsize="1" width="1"]; edge [fontsize="9" fontname="Arial" color="#333333" arrowhead="normal" arrowsize="0.5"]; place_a [label="a", shape=circle, style="filled"]; place_b [label="b", shape=circle, color="#FF0000", shape="doublecircle"]; place_c [label="c", shape=circle]; place_d [label="d", shape=circle]; place_a -> place_b [label="t1" style="solid"]; place_d -> place_b [label="t1" style="solid"]; place_b -> place_c [label="t2" style="solid"]; place_b -> place_d [label="t3" style="solid"]; } EOGRAPH; $dump = $this->dumper->dump($definition, $marking); $this->assertEquals($expected, $dump); } } __halt_compiler();----SIGNATURE:----kYKI++y0HkebPe1JpuJ4g7nNTmqRdad4V+D1ESVek3WK54iSNSAKK2arp49envCNV/gw+Eg1J4pg/4NNFIyuOpqOD5oRIU6iWO4yWdPP5RDJweJ/GsKwsYkToWXO4I9XaCwRkceeua2JZ2nEvOwnQgj30jTOFQ/xF1l5qV/MHw/KsJ5FrMMnLMahv6uNEFeDt7bkt8V1DvrmoarsyVMVFWHNoVQq/w+99nMJ0TO8ZimfG8pUwrhYKGAJhjxPLbSPkNzsJfNkIMXzW1QhC6eSaVejA7WTEm4tJQLRYLFxHURluMxSgQCLQislUAqwSq1aMBnu+NlXSJfO6QUVQv8aLIo1peBtaAoX3KeaZn51yVFORCterWI0VVgI/u1ChbsI0+93n/N8H42edcbxLPxJ5V7Eej6ANZsJEFlnX7U/EMga52rZjKASdfd3fwrd/6FOo0vZyADtKD0VSihdGCL44cvbui5ur0wDG8EDW+YsAJ+WnmY4OSuTgjTXQpVFWeoYs5usTTTwi2BxJKLAwkdboGazfREa1PzzLKIVC19pOTTjnX3AbpL4hEwzNjwx1TwCqQn/w04l015JmORPzbkOcrFz6aBM+0ffmNJ1xvPKXBZRfVsOjmZkWV/ITeyOYrAhObjX7hJciGDbnMvkQgr1Vu0L8qR0FeVASuXw2zUq9JM=----ATTACHMENT:----MjQwNzYwNDkxNDg5NDYxNyA4NDM3MTA5NTU4MDI5NDc4IDI4OTEyMzY2MzY1MTMzNg==