public function testRunLegacyHooks() { Hooks::register('testRunLegacyHooks', __CLASS__ . '::dummyHookHandler'); $content = new WikitextContent('test text'); $ok = ContentHandler::runLegacyHooks('testRunLegacyHooks', array('foo', &$content, 'bar'), false); $this->assertTrue($ok, "runLegacyHooks should have returned true"); $this->assertEquals("TEST TEXT", $content->getNativeData()); }
/** * Get parser output for Wiki text * @param $text * @return ParserOutput */ private function getParserOutput($text) { $content = new WikitextContent($text); return $content->getParserOutput($this->getMockTitle()); }