コード例 #1
0
 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());
 }
コード例 #2
0
 /**
  * Get parser output for Wiki text
  * @param $text
  * @return ParserOutput
  */
 private function getParserOutput($text)
 {
     $content = new WikitextContent($text);
     return $content->getParserOutput($this->getMockTitle());
 }