/** * @dataProvider getHtmlProvider */ public function testGetHtml($expected, $message, $languageCode) { $lang = Language::factory($languageCode); $specialPageCopyrightView = new SpecialPageCopyrightView($this->getCopyrightMessageBuilder($message), 'x', 'y'); $html = $specialPageCopyrightView->getHtml($lang, 'wikibase-submit'); $this->assertEquals($expected, $html); }
/** * @todo could factor this out into a special page form builder and renderer */ private function addCopyrightText() { $copyrightView = new SpecialPageCopyrightView(new CopyrightMessageBuilder(), $this->rightsUrl, $this->rightsText); $html = $copyrightView->getHtml($this->getLanguage(), 'wikibase-newentity-submit'); $this->getOutput()->addHTML($html); }
/** * @todo could factor this out into a special page form builder and renderer */ private function addCopyrightText() { $copyrightView = new SpecialPageCopyrightView(new CopyrightMessageBuilder(), $this->rightsUrl, $this->rightsText); $submitKey = 'wikibase-' . strtolower($this->getName()) . '-submit'; $html = $copyrightView->getHtml($this->getLanguage(), $submitKey); $this->getOutput()->addHTML($html); }