You are here

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

File

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

Class

ShareaholicSeqShareCountsTest

Code

public function testHasHttpError() {
  $response = NULL;
  $this
    ->assertTrue($this->share_count
    ->has_http_error($response), 'should return true for null response');
  $response = array();
  $this
    ->assertTrue($this->share_count
    ->has_http_error($response), 'should return true for empty response');
  $response = array(
    'response' => array(
      'code' => 200,
    ),
    'body' => '',
  );
  $this
    ->assertFalse($this->share_count
    ->has_http_error($response), 'should return false');
}