/** * Get information about a graph. * @param string $name The name of the graph. * @throws GraphManagerException * @return array */ public function getGraphInfo($name) { $graphHandler = $this->_toolbox->getGraphHandler(); $graph = $graphHandler->getGraph($name); if (!$graph) { throw new GraphManagerException("Graph does not exist"); } $result = array(); $result['id'] = $graph->getKey(); $result['name'] = $graph->getKey(); $result['revision'] = $graph->getRevision(); $result['verticesCollection'] = $graph->getVerticesCollection(); $result['edgesCollection'] = $graph->getEdgesCollection(); return $result; }
/** * @covers Paradox\Toolbox::getGraphHandler */ public function testGetGraphHandler() { $graphHandler = $this->toolbox->getGraphHandler(); $this->assertInstanceOf('triagens\\ArangoDb\\GraphHandler', $graphHandler, 'getGraphHandler() did not return a triagens\\ArangoDb\\GraphHandler'); }