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