/** * @return void */ public function prepareFavicon() { if ($this->pageConfig->getFaviconFile()) { $this->pageConfig->addRemotePageAsset($this->pageConfig->getFaviconFile(), Generator\Head::VIRTUAL_CONTENT_TYPE_LINK, ['attributes' => ['rel' => 'icon', 'type' => 'image/x-icon']], 'icon'); $this->pageConfig->addRemotePageAsset($this->pageConfig->getFaviconFile(), Generator\Head::VIRTUAL_CONTENT_TYPE_LINK, ['attributes' => ['rel' => 'shortcut icon', 'type' => 'image/x-icon']], 'shortcut-icon'); } else { $this->pageConfig->addPageAsset($this->pageConfig->getDefaultFavicon(), ['attributes' => ['rel' => 'icon', 'type' => 'image/x-icon']], 'icon'); $this->pageConfig->addPageAsset($this->pageConfig->getDefaultFavicon(), ['attributes' => ['rel' => 'shortcut icon', 'type' => 'image/x-icon']], 'shortcut-icon'); } }
public function testGetFaviconFile() { $expected = 'test'; $this->favicon->expects($this->once())->method('getFaviconFile')->will($this->returnValue($expected)); $this->assertEquals($expected, $this->model->getFaviconFile()); }
/** * {@inheritdoc} */ public function getFaviconFile() { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getFaviconFile'); if (!$pluginInfo) { return parent::getFaviconFile(); } else { return $this->___callPlugins('getFaviconFile', func_get_args(), $pluginInfo); } }