/** * @covers WPSEO_Twitter::twitter_url */ public function test_twitter_url() { // create and go to post $post_id = $this->factory->post->create(); $this->go_to(get_permalink($post_id)); $expected = $this->metatag('url', esc_url(self::$class_instance->canonical(false))); self::$class_instance->twitter_url(); $this->expectOutput($expected); }