예제 #1
0
 public function testGetUserFriendList()
 {
     $userId = 16;
     $queryTemplate = strtr(Node::QUERY_TEMPLATE_GET_USER_FRIENDS, array('{userId}' => $userId));
     $userList = [3 => 'Name 3', 4 => 'Name 4'];
     $neo4j = $this->_getNeo4jMock($queryTemplate, $userList);
     $nodeRepository = new Node($neo4j);
     $this->assertEquals($userList, $nodeRepository->getUserFriendList($userId));
 }
예제 #2
0
 /**
  * Get user friends list.
  *
  * @param string $id
  * @return Response
  */
 public function getFriendList($id)
 {
     return new Response($this->_nodeRepository->getUserFriendList($id), Response::HTTP_OK);
 }