public function website_facebook() { if ('article' === $this->type(false) && !empty($this->options['facebook_site'])) { $this->og_tag('article:publisher', $this->options['facebook_site']); return true; } return false; }
/** * @covers WPSEO_OpenGraph::website_facebook */ public function test_website_facebook() { // option not set $this->assertFalse(self::$class_instance->website_facebook()); // set option self::$class_instance->options['facebook_site'] = 'http://facebook.com/mysite/'; // test output $this->assertTrue(self::$class_instance->website_facebook()); $this->expectOutput('<meta property="article:publisher" content="http://facebook.com/mysite/" />' . "\n"); }