You are here

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

This test may fail if the APIs fail

File

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

Class

ShareaholicSeqShareCountsTest

Code

public function testIsUrlEncoded() {
  $url = 'http://eatnabout.com/2014/03/29/bestie/#more-10144';
  $encoded_url = 'http%3A%2F%2Featnabout.com%2F2014%2F03%2F29%2Fbestie%2F%23more-10144';
  $this
    ->assertTrue($this->share_count
    ->is_url_encoded($encoded_url), 'It should return true when the url is encoded');
  $this
    ->assertFalse($this->share_count
    ->is_url_encoded($url), 'It should return false when the url is not encoded');
}