Skip to content

Commit

Permalink
repair broken ci
Browse files Browse the repository at this point in the history
  • Loading branch information
phcorp committed Mar 20, 2017
1 parent 60b78fb commit 7785a9f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
8 changes: 8 additions & 0 deletions src/Graphviz/Graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ public function createVertex($id)
*/
public function getVertices()
{
if ($this->vertices) {
ksort($this->vertices);
}

return $this->vertices ? array_values($this->vertices) : [];
}

Expand Down Expand Up @@ -113,6 +117,10 @@ public function removeVertex(Vertex $vertex)
*/
public function getEdges()
{
if ($this->edges) {
ksort($this->edges);
}

return $this->edges ? array_values($this->edges) : [];
}

Expand Down
10 changes: 5 additions & 5 deletions test/Command/DoctrinevizCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,16 @@ public function testExecuteDotFormatting()
' width="4"'.PHP_EOL.
' label="USER_GROUP|<group_id> group_id : integer\\l|<user_id> user_id : integer\\l"'.PHP_EOL.
' ]'.PHP_EOL.
' user_group:group_id : integer -> group:id : integer ['.PHP_EOL.
' label="* 1"'.PHP_EOL.
' ];'.PHP_EOL.
' user_group:user_id : integer -> user:id : integer ['.PHP_EOL.
' user:address_id : integer -> address:id : integer ['.PHP_EOL.
' label="* 1"'.PHP_EOL.
' ];'.PHP_EOL.
' user:email_id : integer -> email:id : integer ['.PHP_EOL.
' label="1 1"'.PHP_EOL.
' ];'.PHP_EOL.
' user:address_id : integer -> address:id : integer ['.PHP_EOL.
' user_group:group_id : integer -> group:id : integer ['.PHP_EOL.
' label="* 1"'.PHP_EOL.
' ];'.PHP_EOL.
' user_group:user_id : integer -> user:id : integer ['.PHP_EOL.
' label="* 1"'.PHP_EOL.
' ];'.PHP_EOL.
'}'.PHP_EOL;
Expand Down
8 changes: 4 additions & 4 deletions test/Graphviz/GraphTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function testAccessors()
// init values
$vertex1 = new Vertex('foo');
$vertex2 = new Vertex('bar');
$vertices = [$vertex1, $vertex2];
$vertices = [$vertex2, $vertex1];
$edge = new Edge($vertex1, $vertex2);
$edges = [$edge];
// getters and setters
Expand Down Expand Up @@ -72,12 +72,12 @@ public function testAccessors()
$graph->addEdge($edge);
$this->assertEquals('digraph g {'.PHP_EOL.
' bee="zoo"'.PHP_EOL.
' foo ['.PHP_EOL.
' label="foo"'.PHP_EOL.
' ]'.PHP_EOL.
' bar ['.PHP_EOL.
' label="bar"'.PHP_EOL.
' ]'.PHP_EOL.
' foo ['.PHP_EOL.
' label="foo"'.PHP_EOL.
' ]'.PHP_EOL.
' foo -> bar;'.PHP_EOL.
'}', (string) $graph);
}
Expand Down

0 comments on commit 7785a9f

Please sign in to comment.