Merge "registration: Add support for $wgParserTestFiles"

This commit is contained in:
jenkins-bot 2015-05-04 19:33:55 +00:00 committed by Gerrit Code Review
commit 52fbc77083
3 changed files with 15 additions and 1 deletions

View file

@ -636,6 +636,10 @@
"config": {
"type": "object",
"description": "Configuration options for this extension"
},
"ParserTestFiles": {
"type": "array",
"description": "Parser test suite files to be run by parserTests.php when no specific filename is passed to it"
}
}
}

View file

@ -24,7 +24,6 @@ class ExtensionProcessor implements Processor {
'ContentHandlers',
'ConfigRegistry',
'RateLimits',
'ParserTestFiles',
'RecentChangesFlags',
'MediaHandlers',
'ExtensionFunctions',
@ -123,6 +122,7 @@ class ExtensionProcessor implements Processor {
$this->extractMessagesDirs( $dir, $info );
$this->extractNamespaces( $info );
$this->extractResourceLoaderModules( $dir, $info );
$this->extractParserTestFiles( $dir, $info );
if ( isset( $info['callback'] ) ) {
$this->callbacks[] = $info['callback'];
$this->processed[] = 'callback';
@ -270,6 +270,15 @@ class ExtensionProcessor implements Processor {
}
}
protected function extractParserTestFiles( $dir, array $info ) {
if ( isset( $info['ParserTestFiles'] ) ) {
foreach ( $info['ParserTestFiles'] as $path ) {
$this->globals['wgParserTestFiles'][] = "$dir/$path";
}
$this->processed[] = 'ParserTestFiles';
}
}
/**
* @param string $name
* @param mixed $value

View file

@ -13,6 +13,7 @@ class ConvertExtensionToRegistration extends Maintenance {
'ResourceModuleSkinStyles' => 'handleResourceModules',
'Hooks' => 'handleHooks',
'ExtensionFunctions' => 'handleExtensionFunctions',
'ParserTestFiles' => 'removeAbsolutePath',
);
/**