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:----f2SkeMDG57/AcGsu7KWk6gWGiULU4h2J+NJpdWXr4VrIb1lqtRHW4e+cmWQxrP2r24HAY0LA/n+juFyvzF8gXzl+WZDTd448SpcAHoy3cQTTLUqy1OPUKXKQHpHj3WWFaC0BKH7nh1Wo7nqLBH3RVzJJy+wuHoTox7LsHc36Urhc+5713kwMt6PBjMKxO6BFXr7bAlokfW5SW+X33UWgQgUzMixTf8JOdVtjpsM5omLIdXgQu6VI63U9ocbkjzaIQgvrJrR15Bn3piH4IY4HncA4Sxrohza4Bbk2v8G8dIHyV1LUnv8LDRb78eqnsdC027lCNqAJDgW0RKIYIQz+d0Z01nDgikQzDfZfS/hE+44Lu4BYhZiTTFP0n4e46D+NB/w2ya4rcVaP2Bnm6d8ZkXkc5a8g8VDlQWNpasGi2oSJuM4C/9Nf7Ch9IiFxvEsY1IWkhpUJSGn1yD2T40D6cM69J/h8+58QQCSbteEpiI4re/YsAr+wVxEGmzko4KZ+l2kv5PGnPw3AqOWhQDR9AMSwVQKCpYjCAUOOHZc8wNe/R4+rijR3SkC4dMJPMTvkX0DD8nKSEUX+eBJms5LfZQ8FcFCVZPvN3+Ok6WZH20zTsSCyppnP8t+bdlCGAhGBufLN73O4Rrl/MLVs9aOWFM/XvPKZgjRgrGVgUbPQ6o0=----ATTACHMENT:----MTQ2NDU3MjA5ODM1NjU4MyA1MzU2ODcyMTI4MDE4NzM3IDg3MzkzMTQwMTg3NzkyOA==