public function testGetUserListFromCircle() { $id = 10; $depth = 3; $queryTemplate = strtr(Node::QUERY_TEMPLATE_GET_USERS_BY_CIRCLE, array('{id}' => $id, '{depth}' => $depth)); $userList = [3 => 'Name 3', 5 => 'Name 5']; $neo4j = $this->_getNeo4jMock($queryTemplate, $userList); $nodeRepository = new Node($neo4j); $this->assertEquals($userList, $nodeRepository->getUserListFromCircle($id, $depth)); }
/** * Get user list from circle with selected depth. * * @param string $id Root user Id. * @param string $circleDepth Depth of friends circle. * @return Response */ public function getFriendCircle($id, $circleDepth) { return new Response($this->_nodeRepository->getUserListFromCircle($id, $circleDepth), Response::HTTP_OK); }