X-Git-Url: http://git.cyclocoop.org/%28?a=blobdiff_plain;f=includes%2Fregistration%2FExtensionProcessor.php;h=1d3fd86d8b64db0d8004208a5ba3bb6b6fd254d5;hb=0a08a3144b46d6f1217eb792bd7b464711c71a22;hp=07fab78f9657e239c170ad3a4c81fd9947cc064e;hpb=f310541eda07e43fd13683345cd967685ff2f34a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/registration/ExtensionProcessor.php b/includes/registration/ExtensionProcessor.php index 07fab78f96..1d3fd86d8b 100644 --- a/includes/registration/ExtensionProcessor.php +++ b/includes/registration/ExtensionProcessor.php @@ -107,7 +107,7 @@ class ExtensionProcessor implements Processor { ]; /** - * Things that are not 'attributes', but are not in + * Things that are not 'attributes', and are not in * $globalSettings or $creditsAttributes. * * @var array @@ -119,6 +119,7 @@ class ExtensionProcessor implements Processor { 'ResourceFileModulePaths', 'ResourceModules', 'ResourceModuleSkinStyles', + 'QUnitTestModule', 'ExtensionMessagesFiles', 'MessagesDirs', 'type', @@ -394,6 +395,19 @@ class ExtensionProcessor implements Processor { } } } + + if ( isset( $info['QUnitTestModule'] ) ) { + $data = $info['QUnitTestModule']; + if ( isset( $data['localBasePath'] ) ) { + if ( $data['localBasePath'] === '' ) { + // Avoid double slashes (e.g. /extensions/Example//path) + $data['localBasePath'] = $dir; + } else { + $data['localBasePath'] = "$dir/{$data['localBasePath']}"; + } + } + $this->attributes['QUnitTestModules']["test.{$info['name']}"] = $data; + } } protected function extractExtensionMessagesFiles( $dir, array $info ) {