dumper = new GraphvizDumper(); } /** * @dataProvider provideWorkflowDefinitionWithoutMarking */ public function testDumpWithoutMarking($definition, $expected) { $dump = $this->dumper->dump($definition); $this->assertEquals($expected, $dump); } /** * @dataProvider provideWorkflowDefinitionWithMarking */ public function testDumpWithMarking($definition, $marking, $expected) { $dump = $this->dumper->dump($definition, $marking); $this->assertEquals($expected, $dump); } public function provideWorkflowDefinitionWithMarking() { yield array( $this->createComplexWorkflowDefinition(), new Marking(array('b' => 1)), $this->createComplexWorkflowDefinitionDumpWithMarking(), ); yield array( $this->createSimpleWorkflowDefinition(), new Marking(array('c' => 1, 'd' => 1)), $this->createSimpleWorkflowDumpWithMarking(), ); } public function provideWorkflowDefinitionWithoutMarking() { yield array($this->createComplexWorkflowDefinition(), $this->provideComplexWorkflowDumpWithoutMarking()); yield array($this->createSimpleWorkflowDefinition(), $this->provideSimpleWorkflowDumpWithoutMarking()); } public function createComplexWorkflowDefinitionDumpWithMarking() { return '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_e [label="e", shape=circle]; place_f [label="f", shape=circle]; place_g [label="g", shape=circle]; transition_t1 [label="t1", shape=box, shape="box", regular="1"]; transition_t2 [label="t2", shape=box, shape="box", regular="1"]; transition_t3 [label="t3", shape=box, shape="box", regular="1"]; transition_t4 [label="t4", shape=box, shape="box", regular="1"]; transition_t5 [label="t5", shape=box, shape="box", regular="1"]; transition_t6 [label="t6", shape=box, shape="box", regular="1"]; place_a -> transition_t1 [style="solid"]; transition_t1 -> place_b [style="solid"]; transition_t1 -> place_c [style="solid"]; place_b -> transition_t2 [style="solid"]; place_c -> transition_t2 [style="solid"]; transition_t2 -> place_d [style="solid"]; place_d -> transition_t3 [style="solid"]; transition_t3 -> place_e [style="solid"]; place_d -> transition_t4 [style="solid"]; transition_t4 -> place_f [style="solid"]; place_e -> transition_t5 [style="solid"]; transition_t5 -> place_g [style="solid"]; place_f -> transition_t6 [style="solid"]; transition_t6 -> place_g [style="solid"]; } '; } public function createSimpleWorkflowDumpWithMarking() { return '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, color="#FF0000", shape="doublecircle"]; transition_t1 [label="t1", shape=box, shape="box", regular="1"]; transition_t2 [label="t2", shape=box, shape="box", regular="1"]; place_a -> transition_t1 [style="solid"]; transition_t1 -> place_b [style="solid"]; place_b -> transition_t2 [style="solid"]; transition_t2 -> place_c [style="solid"]; } '; } public function provideComplexWorkflowDumpWithoutMarking() { return '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_e [label="e", shape=circle]; place_f [label="f", shape=circle]; place_g [label="g", shape=circle]; transition_t1 [label="t1", shape=box, shape="box", regular="1"]; transition_t2 [label="t2", shape=box, shape="box", regular="1"]; transition_t3 [label="t3", shape=box, shape="box", regular="1"]; transition_t4 [label="t4", shape=box, shape="box", regular="1"]; transition_t5 [label="t5", shape=box, shape="box", regular="1"]; transition_t6 [label="t6", shape=box, shape="box", regular="1"]; place_a -> transition_t1 [style="solid"]; transition_t1 -> place_b [style="solid"]; transition_t1 -> place_c [style="solid"]; place_b -> transition_t2 [style="solid"]; place_c -> transition_t2 [style="solid"]; transition_t2 -> place_d [style="solid"]; place_d -> transition_t3 [style="solid"]; transition_t3 -> place_e [style="solid"]; place_d -> transition_t4 [style="solid"]; transition_t4 -> place_f [style="solid"]; place_e -> transition_t5 [style="solid"]; transition_t5 -> place_g [style="solid"]; place_f -> transition_t6 [style="solid"]; transition_t6 -> place_g [style="solid"]; } '; } public function provideSimpleWorkflowDumpWithoutMarking() { return '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]; transition_t1 [label="t1", shape=box, shape="box", regular="1"]; transition_t2 [label="t2", shape=box, shape="box", regular="1"]; place_a -> transition_t1 [style="solid"]; transition_t1 -> place_b [style="solid"]; place_b -> transition_t2 [style="solid"]; transition_t2 -> place_c [style="solid"]; } '; } } __halt_compiler();----SIGNATURE:----YTctqIIBogWLFFAC33KONSf9+hI3+TqghRx0D10Ok2HHefjRisvYVmSKo9wJjDPuOcP3eMTbFfGnC0u76EQx1jnqFBbNuynWf/kmF2PvUgahJEOq1dBGHhE5JmlE1do2wj90wyPDfyWC8Dfz4JspMnKMUqQjZgoylL2FGdyyzRNCUW2uHj7wXHhFMTHhE31OXag+FwMcV1z66QapfKscgPk2hLko+nVowTztZKKIb5LvQTTn+8P16ukkQfwvfGTbP+ehoBl5KgC4sGqQghm+bspBqrOJlGtWqO4m/UpGWRqPOq0O+8XZ3p0THFYhJ8fBriV1nOlu89Oz136rec5Fn71GPsp7YSTo3/BQERSVORz22iYxKxkZ7zmJtOpRgP5FUDl5NBgsTbfq4qWuC5+cd+9CcRJ1XM335jxSsZb0Z+eQs2iUO0RwjKzhIo5uFuz8Ku8V/KsOp2MA+xr/WLxnSQ09W8canAX9KSg0+Q7e5X/yz0ZXuQXnLstgvo1i5BP2u0NvAgnnekqa0N+XwCr6kCtzosXaHsPSwxgBXkLJ865Og8DZS0/BbSg9j34gjaKi6AcZ8O+7hx2PlVslTgWY79x22YLJQXsUbvb1d3aH5HvArBDcqeqvlnao1baoCTbVgVDl6kA9LmS+7QlLWsc5EN9HLzugbqpZUgviKPo0Qd8=----ATTACHMENT:----NTc4MjE2NTY3OTc5MDQ5NyAzOTI5NzYwODEzOTc3OTEyIDQ2NzAyMjUzNjgzMzY2OTE=