Beispiel #1
0
 public function testGetAllUsersList()
 {
     $userId = 16;
     $queryTemplate = Node::QUERY_TEMPLATE_GET_ALL_USERS;
     $userList = [6 => 'Name 6', 2 => 'Name 2'];
     $neo4j = $this->_getNeo4jMock($queryTemplate, $userList);
     $nodeRepository = new Node($neo4j);
     $this->assertEquals($userList, $nodeRepository->getAllUsersList($userId));
 }
 /**
  * Get list user with friend request.
  *
  * @param $id
  * @return Response
  */
 public function getFriendRequestUsers($id)
 {
     return new Response($this->_nodeRepository->getFriendRequestUserList($id), Response::HTTP_OK);
 }
 /**
  *  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);
 }
Beispiel #4
0
 /**
  * Get all user.
  *
  * @return Response
  */
 public function listUsers()
 {
     return new Response($this->_nodeRepository->getAllUsersList(), Response::HTTP_OK);
 }