| 1 |
<?php |
| 2 |
|
| 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; |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
class ParserTestMockParser extends Parser { |
| 14 |
|
| 15 |
public function __construct() { |
| 16 |
} |
| 17 |
|
| 18 |
public function preSaveTransform( $text, PageReference $page, UserIdentity $user, |
| 19 |
ParserOptions $options, $clearState = true |
| 20 |
) { |
| 21 |
return $text; |
| 22 |
} |
| 23 |
|
| 24 |
public function parse( |
| 25 |
$text, PageReference $page, ParserOptions $options, |
| 26 |
$linestart = true, $clearState = true, $revid = null |
| 27 |
) { |
| 28 |
return new ParserOutput; |
| 29 |
} |
| 30 |
|
| 31 |
public function getOutput() { |
| 32 |
return new ParserOutput; |
| 33 |
} |
| 34 |
} |