/** * @dataProvider providerGetSitename */ public function testGetSitename($configValue, $expected) { // set config variables $values = array('wgMFTrademarkSitename' => $configValue, 'wgSitename' => 'MyWiki'); $this->setMwGlobals($values); $sitename = SkinMinerva::getSitename(true); $this->assertEquals($sitename, $expected); }
/** * @inheritdoc * Renders a search link and branding. */ protected function makeChromeHeaderContent($data) { $templateParser = new TemplateParser(__DIR__ . '/../../templates'); $args = array('siteName' => SkinMinerva::getSitename(), 'showSearchForm' => $this->isSpecialMobileMenuPage, 'showTitle' => !$this->isSpecialMobileMenuPage); if ($this->isSpecialMobileMenuPage) { $args += array('mobileMenuClass' => 'js-only back ' . MobileUI::iconClass('back'), 'mobileMenuLink' => '#back', 'mobileMenuTitle' => wfMessage('mobile-frontend-main-menu-back')->parse(), 'searchForm' => $this->makeSearchForm($data)); } else { $args += array('mobileMenuClass' => MobileUI::iconClass('search'), 'mobileMenuLink' => SpecialPage::getTitleFor('MobileMenu')->getLocalUrl(), 'mobileMenuTitle' => wfMessage('mobile-frontend-main-menu')->parse(), 'searchInputClass' => 'hidden'); } echo $templateParser->processTemplate('header', $args); }
/** * @inheritdoc */ protected function getHeaderHtml($data) { $templateParser = new TemplateParser(__DIR__); $args = array('siteName' => SkinMinerva::getSitename(), 'mobileMenuClass' => MobileUI::iconClass('search-gray', 'element', 'header-icon'), 'mobileMenuLink' => SpecialPage::getTitleFor('MobileMenu')->getLocalUrl(), 'mobileMenuTitle' => wfMessage('mobile-frontend-main-menu')->parse(), 'secondaryButton' => $data['secondaryButton']); return $templateParser->processTemplate('header', $args); }