You are here

public function ShareaholicSeqShareCountsTest::testBufferCountCallback 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::testBufferCountCallback()

File

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

Class

ShareaholicSeqShareCountsTest

Code

public function testBufferCountCallback() {

  // given a typical buffer counts api response, test that
  // it gives back the expected result (the shares which is 3)
  $body = '{"shares":3}';
  $this->response['body'] = $body;
  $count = $this->share_count
    ->buffer_count_callback($this->response);
  $this
    ->assertEquals(3, $count, 'It should get the correct buffer count');
}