This makes debugging simpler by avoiding log noise, hitting breakpoints
unexpectedly, etc. This means that {{subst:}} is no longer supported in
!!article sections, but I could only find one test which relied on that.
Change-Id: I6400defa389389e5d9632fb01d4a534c0d88d442
20 lines
480 B
PHP
20 lines
480 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;
|
|
}
|
|
}
|