public function testGetPaths_DirectionGivenButNoType_ThrowsException() { $startNode = new Node($this->client); $startNode->setId(123); $endNode = new Node($this->client); $endNode->setId(456); $finder = new PathFinder($this->client); $finder->setDirection(Relationship::DirectionOut)->setStartNode($startNode)->setEndNode($endNode); $this->setExpectedException('\\Everyman\\Neo4j\\Exception'); $paths = $this->client->getPaths($finder); }
/** * Find paths from this node to the given node * * @param Node $to * @param string $type * @param string $dir * @return PathFinder */ public function findPathsTo(Node $to, $type = null, $dir = null) { $finder = new PathFinder($this->client); $finder->setStartNode($this); $finder->setEndNode($to); if ($dir) { $finder->setDirection($dir); } if ($type) { $finder->setType($type); } return $finder; }