You are here

public function ShareaholicSeqShareCountsTest::testFacebookCountCallback in Share Buttons, Related Posts, Content Analytics - Shareaholic 8

Same name and namespace in other branches
  1. 7.3 lib/social-share-counts/seq_share_count_test.php \ShareaholicSeqShareCountsTest::testFacebookCountCallback()

File

lib/social-share-counts/seq_share_count_test.php, line 62

Class

ShareaholicSeqShareCountsTest

Code

public function testFacebookCountCallback() {

  // given a typical facebook counts api response, test that
  // it gives back the expected result (the total_count which is 16)
  $json = '{ "id": "https://blog.shareaholic.com", "shares": 16 }';
  $this->response['body'] = $json;
  $facebook_count = $this->share_count
    ->facebook_count_callback($this->response);
  $this
    ->assertEquals(16, $facebook_count, 'It should get the correct fb count');
}