Require MW >= 1.29

This commit is contained in:
Luqgreg 2018-08-19 13:35:46 +02:00
parent 8a93653f0b
commit 5053750f84
2 changed files with 7 additions and 1 deletions

View file

@ -9,6 +9,9 @@
"version": "0.3-dev",
"type": "parserhook",
"license-name": "GPL-3.0-or-later",
"requires": {
"MediaWiki": ">= 1.29.0"
},
"config": {
"AllInfoboxesMiserMode": true,
"AllInfoboxesSubpagesBlacklist": [ "doc", "draft", "test" ],

View file

@ -12,7 +12,10 @@ class MediaWikiParserTest extends MediaWikiTestCase {
$this->parser = new Parser();
$title = Title::newFromText( 'test' );
$options = new ParserOptions();
$options->setOption( 'wrapclass', false );
// Required for MW >= 1.30
if( method_exists ( $options, 'setOption' ) ) {
$options->setOption( 'wrapclass', false );
}
$this->parser->startExternalParse( $title, $options, 'text', true );
parent::setUp();
}