Localisation updates from https://translatewiki.net.
[mediawiki.git] / tests / parser / ParserTestMockParser.php
blob7204052fe273a98c13d9d5112f4028bc75010204
1 <?php
3 use MediaWiki\Page\PageReference;
4 use MediaWiki\Parser\Parser;
5 use MediaWiki\Parser\ParserOptions;
6 use MediaWiki\Parser\ParserOutput;
7 use MediaWiki\User\UserIdentity;
9 /**
10 * A parser used during article insertion which does nothing, to avoid
11 * unnecessary log noise and other interference with debugging.
13 class ParserTestMockParser extends Parser {
15 public function __construct() {
18 public function preSaveTransform( $text, PageReference $page, UserIdentity $user,
19 ParserOptions $options, $clearState = true
20 ) {
21 return $text;
24 public function parse(
25 $text, PageReference $page, ParserOptions $options,
26 $linestart = true, $clearState = true, $revid = null
27 ) {
28 return new ParserOutput;
31 public function getOutput() {
32 return new ParserOutput;