49 $this->testParserOptions = ParserOptions::newFromUserAndLang(
new User,
50 MediaWikiServices::getInstance()->getContentLanguage() );
52 $this->testParser =
new Parser();
53 $this->testParser->Options( $this->testParserOptions );
54 $this->testParser->clearState();
56 $this->title = Title::newFromText(
'Preload Test' );
62 unset( $this->testParser );
63 unset( $this->title );
72 '<pre>monospaced</pre>',
73 '<pre>monospaced</pre>',
74 '<pre> in preloaded text must be unstripped (T29467)'
80 '<nowiki>[[Dummy title]]</nowiki>',
81 '<nowiki>[[Dummy title]]</nowiki>',
82 '<nowiki> in preloaded text must be unstripped (T29467)'
89 $this->testParser->getPreloadText(
92 $this->testParserOptions
Set options of the Parser.
Basic tests for Parser::getPreloadText.
testPreloadedPreIsUnstripped()
ParserOptions $testParserOptions
assertPreloaded( $expected, $text, $msg='')
testPreloadedNowikiIsUnstripped()
PHP Parser - Processes wiki markup (which uses a more user-friendly syntax, such as "[[link]]" for ma...
Represents a title within MediaWiki.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...