Introducing ContentGetParserOutput hook.
[lhc/web/wiklou.git] / tests / phpunit / includes / content / ContentHandlerTest.php
index 67d4fde..2904472 100644 (file)
@@ -317,6 +317,7 @@ class DummyContentHandlerForTesting extends ContentHandler {
         */
        public function unserializeContent( $blob, $format = null ) {
                $d = unserialize( $blob );
+
                return new DummyContentForTesting( $d );
        }
 
@@ -430,4 +431,18 @@ class DummyContentForTesting extends AbstractContent {
        public function getParserOutput( Title $title, $revId = null, ParserOptions $options = null, $generateHtml = true ) {
                return new ParserOutput( $this->getNativeData() );
        }
+
+       /**
+        * @see AbstractContent::fillParserOutput()
+        *
+        * @param $title        Title Context title for parsing
+        * @param $revId        int|null Revision ID (for {{REVISIONID}})
+        * @param $options      ParserOptions|null Parser options
+        * @param $generateHtml bool Whether or not to generate HTML
+        * @param $output       ParserOutput The output object to fill (reference).
+        */
+       protected function fillParserOutput( Title $title, $revId,
+                       ParserOptions $options, $generateHtml, ParserOutput &$output ) {
+               $output = new ParserOutput( $this->getNativeData() );
+       }
 }