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:----Q6FMMwWuR9sGx5e3b1J7DjDffIEcA9hymW6+2A8e8ltg30RYrqkz1Ps1H8tmG4FalHvITWJqtotas4CyPJcLsD1kUHzCfDBbNOIHizzwjBFWK8zc4bCtbzPoG0qVHaGKuZPm1yvMeOcN/fijtBKJCm5tV99RlFP6y999q71nI03QcqYvRqP96yAfXWeIyJldI42ZzlaWXKUVITxrTV6ebRWt62It9MvyMI8qkc7GMa+tNFs8tD7/e7GU0WZS7a6B7ZpqWnUYpGkypN+ugn9s/RmerSIBxncm2GUcxyrz6Y9qHgY49GQkqTk5ybzPnXkDnCH62TM2pSWS100wqkLz35Yq05GsoLValVbJb9sa3smi7BOGlY/cOIg+46KjdJMLLP2p0R7BKpVKE+1l3c84Qx81n16S0Y0ZzN0/cPSpvVNK8+gr5BWavssgfWxOFX53dD4nGwPe+j93mWcIo3WR53Uf92QPtxDIws9VbLI0+wj91D0FmKxGDa87PwZ4LwpFuSfpbzmZZFOitlrOpdps5UsMKkekbfnodfq8X5Z8QPUNqGTBmfMeWfdqa7Du+oL/FU0gNzujBa2nlEAOlQmrhG5YH3WeTdKW9Kw7Y2vy5/e1Pgi2w5xc/ZtYydrD0j3uJRpi79P4rPascpv6rLSXFWsD1H5GG9Q0c/3YsgXMias=----ATTACHMENT:----MzM4MTE4OTAxNjU2Njg0OSAxMzUwMTMxMjEyMDQwNTIxIDM2Mzg3OTQwNjY2MjE3ODY=