private function getSocialHashtag($tag)
 {
     $socialHashtag = new SocialHashtag($tag);
     $instagram = new Instagram();
     $instagram->setClientID(INSTAGRAM_CLIENT_ID);
     $socialHashtag->addFeed(new InstagramFeed($instagram, new InstagramDataFormatter()));
     return $socialHashtag;
 }
 public function testGetResults()
 {
     $feed = $this->getMock('NtaCamp\\SocialHashtag\\Feed\\Feed');
     $post = $this->getMock('NtaCamp\\SocialHashtag\\Post');
     $feed->expects($this->once())->method('getName')->will($this->returnValue('feed'));
     $feed->expects($this->once())->method('getByHash')->will($this->returnValue([$post]));
     $this->socialHashtag->addFeed($feed);
     $results = $this->socialHashtag->getResults();
     $this->assertArrayHasKey('feed', $results);
     $this->assertInstanceOf('NtaCamp\\SocialHashtag\\Post', current($results['feed']));
 }
 public function getSocialHashtag($tag)
 {
     $socialHashtag = new SocialHashtag($tag);
     $socialHashtag->addFeed(new TwitterFeed(new \TwitterAPIExchange(['oauth_access_token' => TWITTER_OAUTH_ACCESS_TOKEN, 'oauth_access_token_secret' => TWITTER_OAUTH_ACCESS_TOKEN_SECRET, 'consumer_key' => TWITTER_CONSUMER_KEY, 'consumer_secret' => TWITTER_CONSUMER_SECRET]), new TwitterDataFormatter()));
     return $socialHashtag;
 }