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", "version": "0.3-dev",
"type": "parserhook", "type": "parserhook",
"license-name": "GPL-3.0-or-later", "license-name": "GPL-3.0-or-later",
"requires": {
"MediaWiki": ">= 1.29.0"
},
"config": { "config": {
"AllInfoboxesMiserMode": true, "AllInfoboxesMiserMode": true,
"AllInfoboxesSubpagesBlacklist": [ "doc", "draft", "test" ], "AllInfoboxesSubpagesBlacklist": [ "doc", "draft", "test" ],

View file

@ -12,7 +12,10 @@ class MediaWikiParserTest extends MediaWikiTestCase {
$this->parser = new Parser(); $this->parser = new Parser();
$title = Title::newFromText( 'test' ); $title = Title::newFromText( 'test' );
$options = new ParserOptions(); $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 ); $this->parser->startExternalParse( $title, $options, 'text', true );
parent::setUp(); parent::setUp();
} }