summaryrefslogtreecommitdiff
path: root/www/wiki/tests/parser/ParserTestMockParser.php
blob: 0757b34cfb69598b2306d90f91d797e9654e09f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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;
	}
}