]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - tests/parser/ParserTestMockParser.php
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / tests / parser / ParserTestMockParser.php
diff --git a/tests/parser/ParserTestMockParser.php b/tests/parser/ParserTestMockParser.php
new file mode 100644 (file)
index 0000000..0757b34
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * A parser used during article insertion which does nothing, to avoid
+ * unnecessary log noise and other interference with debugging.
+ */
+class ParserTestMockParser {
+       public function preSaveTransform( $text, Title $title, User $user,
+               ParserOptions $options, $clearState = true
+       ) {
+               return $text;
+       }
+
+       public function parse(
+               $text, Title $title, ParserOptions $options,
+               $linestart = true, $clearState = true, $revid = null
+       ) {
+               return new ParserOutput;
+       }
+}