Skip to content

Commit 0b1717d

Browse files
committed
Update KeyValueGraph exporter.
1 parent eb4efa8 commit 0b1717d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/src/Exporter/KeyValueGraph.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44

55
namespace drupol\phptree\tests\Exporter;
66

7+
use drupol\phptree\Exporter\Graph;
78
use drupol\phptree\Node\KeyValueNodeInterface;
89
use drupol\phptree\Node\NodeInterface;
910
use Fhaculty\Graph\Vertex;
1011

1112
/**
1213
* Class KeyValueGraph.
1314
*/
14-
class KeyValueGraph extends ValueGraph
15+
class KeyValueGraph extends Graph
1516
{
1617
/**
1718
* {@inheritdoc}
@@ -21,7 +22,7 @@ protected function createVertex(NodeInterface $node): Vertex
2122
$vertex = parent::createVertex($node);
2223

2324
if ($node instanceof KeyValueNodeInterface) {
24-
$vertex->setAttribute('graphviz.label', $node->getValue());
25+
$vertex->setAttribute('graphviz.label', $node->getKey() . $vertex->getAttribute('graphviz.label'));
2526
}
2627

2728
return $vertex;

0 commit comments

Comments
 (0)