public function testParseJSONTweets()
 {
     $api = new TwitterAPIAccessorOAuth($oauth_access_token = '111', $oauth_access_token_secret = '222', $oauth_consumer_key = 1234, $oauth_consumer_secret = 1234, $num_twitter_errors = 5, $log = true);
     $data = file_get_contents(THINKUP_ROOT_PATH . $this->test_data_path . 'json/tweets.json');
     $results = $api->parseJSONTweets($data);
     $this->debug(Utils::varDumpToString($results));
     $this->assertEqual($results[0]["post_text"], "A friendly reminder that this t.co length change will start today, and be in full effect by 2/20 " . "https://t.co/nqvYxZAk   ^JC");
     $this->assertEqual($results[0]["post_id"], "299212472030748672");
     $this->assertEqual($results[0]["user_id"], "6253282");
     $this->assertEqual($results[0]["user_name"], "twitterapi");
     $this->assertEqual($results[0]["author_fullname"], "Twitter API");
     $this->assertEqual($results[0]["location"], "San Francisco, CA");
     // assert reply is processed correctly
     $this->assertEqual($results[5]["post_text"], "@foetusite minutes after tweeting, a developer was kind enough to submit one: https://t.co/8qkLwLuW ^TS");
     $this->assertEqual($results[5]["post_id"], "292042417505443840");
     $this->assertEqual($results[5]["in_reply_to_user_id"], "93378131");
     $this->assertEqual($results[5]["in_reply_to_post_id"], "292038019752538112");
 }
 public function testParseJSONTweets()
 {
     $api = new TwitterAPIAccessorOAuth($oauth_access_token = '111', $oauth_access_token_secret = '222', $oauth_consumer_key = 1234, $oauth_consumer_secret = 1234, $num_twitter_errors = 5, $log = true);
     $data = file_get_contents(THINKUP_ROOT_PATH . $this->test_data_path . 'json/tweets.json');
     $results = $api->parseJSONTweets($data);
     $this->debug(Utils::varDumpToString($results));
     $this->assertEqual($results[0]["post_text"], "A friendly reminder that this t.co length change will start today, and be in full effect by 2/20 " . "https://t.co/nqvYxZAk   ^JC");
     $this->assertEqual($results[0]["post_id"], "299212472030748672");
     $this->assertEqual($results[0]["user_id"], "6253282");
     $this->assertEqual($results[0]["user_name"], "twitterapi");
     $this->assertEqual($results[0]["author_fullname"], "Twitter API");
     $this->assertEqual($results[0]["location"], "San Francisco, CA");
 }