We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6fafadb commit fcb8b98Copy full SHA for fcb8b98
spec/drupol/phptree/tests/TestGraphVizSpec.php
@@ -24,6 +24,28 @@ public function it_is_initializable()
24
$this->shouldHaveType(TestGraphViz::class);
25
}
26
27
+ public function it_can_generate_a_graph()
28
+ {
29
+ $visitor = new BreadthFirstVisitor();
30
+ $graph = new Graph();
31
+ $graphviz = new GraphViz();
32
+
33
+ $this->beConstructedWith($visitor, $graph, $graphviz);
34
35
+ $tree = new ValueNode('root', 2);
36
37
+ $nodes = [];
38
+ foreach (\range('A', 'F') as $letter) {
39
+ $nodes[] = new ValueNode($letter, 2);
40
+ }
41
42
+ $tree->add(...$nodes);
43
44
+ $this
45
+ ->getGraph($tree)
46
+ ->shouldReturnAnInstanceOf(Graph::class);
47
48
49
public function it_can_create_a_graph()
50
{
51
$visitor = new BreadthFirstVisitor();
0 commit comments