/** * @covers WPSEO_Frontend::publisher */ public function test_publisher() { // no publisher set $this->assertFalse(self::$class_instance->publisher()); // set publisher option self::$class_instance->options['plus-publisher'] = 'https://plus.google.com/+JoostdeValk'; // publisher set, should echo $expected = '<link rel="publisher" href="' . esc_url(self::$class_instance->options['plus-publisher']) . '"/>' . "\n"; $this->assertTrue(self::$class_instance->publisher()); $this->expectOutput($expected); }