/** * @covers WPSEO_Twitter::site_domain */ public function test_author_twitter() { $name = 'yoast'; $expected = $this->metatag('creator', '@' . $name); // test option self::$class_instance->options['twitter_site'] = $name; self::$class_instance->author_twitter(); $this->expectOutput($expected); // reset option to make sure next result is from author meta self::$class_instance->options['twitter_site'] = ''; /* TODO fix this part // create post, attach user as author $user_id = $this->factory->user->create( array( 'role' => 'administrator' ) ); $post_id = $this->factory->post->create( array( 'post_title' => 'Sample Post', 'post_type' => 'post', 'post_status' => 'publish', ) ); // go to post we just created $this->go_to( get_permalink( $post_id ) ); // test user meta update_user_meta( $this->user_id, 'twitter', '@' . $name ); self::$class_instance->author_twitter(); $this->expectOutput( $expected ); */ }