You are here

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

File

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

Class

ShareaholicSeqShareCountsTest

Code

public function testPinterestCountCallback() {

  // given a typical pinterest counts api response, test that
  // it gives back the expected result (the count which is 1)
  $body = 'f({"count": 1, "url": "https://blog.shareaholic.com"})';
  $this->response['body'] = $body;
  $count = $this->share_count
    ->pinterest_count_callback($this->response);
  $this
    ->assertEquals(1, $count, 'It should get the correct pinterest count');
}