/**
  * This test checks 'old-style' rt handling and mentions
  */
 public function testAddPostOldStyleRTNoPostID()
 {
     list($post, $entities, $user_array) = $this->buildStreamPostArray3();
     $dao = new PostMySQLDAO();
     $user_dao = new UserMySQLDAO();
     $dao->addPostAndAssociatedInfo($post, $entities, $user_array);
     $post = $dao->getPost('39088041628934144', 'twitter');
     $this->assertEqual($post->in_rt_of_user_id, 40025121);
     $user = $user_dao->getDetails(140955302, 'twitter');
     $this->assertEqual($user->username, 'DAaronovitch');
     $m_dao = new MentionMySQLDAO();
     $mention = $m_dao->getMentionInfoUserID(40025121);
     $mp = $m_dao->getMentionsForPost('39088041628934144');
     $this->assertTrue($mention != null);
     $this->assertEqual($mention['user_name'], 'RSAMatthew');
     $this->assertEqual($mention['count_cache'], 1);
     $this->assertEqual($mp[0]['author_user_id'], 140955302);
 }
 public function testGetMentionInfoUserID()
 {
     $res = $this->dao->getMentionInfoUserID(12);
     $this->assertEqual($res['user_name'], 'user12');
     $this->assertEqual($res['count_cache'], 5);
 }