Merge "registration: Add support for $wgParserTestFiles"
This commit is contained in:
commit
52fbc77083
3 changed files with 15 additions and 1 deletions
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ class ConvertExtensionToRegistration extends Maintenance {
|
|||
'ResourceModuleSkinStyles' => 'handleResourceModules',
|
||||
'Hooks' => 'handleHooks',
|
||||
'ExtensionFunctions' => 'handleExtensionFunctions',
|
||||
'ParserTestFiles' => 'removeAbsolutePath',
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue