wiki.techinc.nl/tests/parser/ParserTestMockParser.php
Aryeh Gregor ab94b63526 Improve test coverage for ApiStashEdit
Change-Id: I1b7d95e074a7f101d13398a32898b74145ab4056
2018-08-21 15:32:29 -07:00

24 lines
542 B
PHP

<?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;
}
public function getOutput() {
return new ParserOutput;
}
}