You are here

public function ShareaholicSeqShareCountsTest::testLinkedinCountCallback in Share Buttons, Related Posts, Content Analytics - Shareaholic 7.3

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

File

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

Class

ShareaholicSeqShareCountsTest

Code

public function testLinkedinCountCallback() {

  // given a typical linkedin counts api response, test that
  // it gives back the expected result (the count which is 8)
  $json = '{"count":8,"fCnt":"8","fCntPlusOne":"9","url":"https:\\/\\/blog.shareaholic.com\\/"}';
  $this->response['body'] = $json;
  $linkedin_count = $this->share_count
    ->linkedin_count_callback($this->response);
  $this
    ->assertEquals(8, $linkedin_count, 'It should get the correct linkedin count');
}