Skip to content

Commit 2e72ca8

Browse files
committed
fix to associatons
1 parent c3394af commit 2e72ca8

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/Node.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function associate($other_node, $association, $association_directionality
4646
try
4747
{
4848
$params = array("node" => $other_node);
49-
$res = $this->client->post($uri, $params, array("_type" => $association));
49+
$res = $this->client->post($uri, $params, $association);
5050
$association_node = new Node($this, $res);
5151
}
5252
catch (\GuzzleHttp\Exception\ClientException $ex)

tests/NodeTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ public function testNodeAssociation()
108108

109109
$associationNode = $node1->associate($node2, "a:linked", true);
110110

111+
$this->assertNotNull($associationNode->id);
111112
$this->assertTrue($associationNode instanceof Node);
112113

113114
$node1->delete();

0 commit comments

Comments
 (0)