/** * Test some content * * @covers Yoast_GA_JS::the_content() */ public function test_the_content() { $test_string = 'Lorem ipsum dolor sit amet, <a href="' . get_site_url() . '/test">Linking text</a> Lorem ipsum dolor sit amet'; $this->assertEquals($this->class_instance->the_content($test_string), "Lorem ipsum dolor sit amet, <a href=\"http://example.org/test\" onclick=\"_gaq.push(['_trackEvent', 'outbound-article-int', 'http://example.org/test', 'Linking text']);\" >Linking text</a> Lorem ipsum dolor sit amet"); }