ParserTestMockParser.php 542 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * A parser used during article insertion which does nothing, to avoid
  4. * unnecessary log noise and other interference with debugging.
  5. */
  6. class ParserTestMockParser {
  7. public function preSaveTransform( $text, Title $title, User $user,
  8. ParserOptions $options, $clearState = true
  9. ) {
  10. return $text;
  11. }
  12. public function parse(
  13. $text, Title $title, ParserOptions $options,
  14. $linestart = true, $clearState = true, $revid = null
  15. ) {
  16. return new ParserOutput;
  17. }
  18. public function getOutput() {
  19. return new ParserOutput;
  20. }
  21. }