< Manual:Hooks
ParserTestGlobals | |
---|---|
Available from version 1.20.0 Allows to define globals for parser tests. | |
Define function: | public static function onParserTestGlobals( array &$globals ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"ParserTestGlobals": "MyExtensionHooks::onParserTestGlobals"
}
}
|
Called from: | File(s): ../tests/parser/ParserTestRunner.php |
Interface: | ParserTestGlobalsHook.php |
For more information about attaching hooks, see Manual:Hooks
For examples of extensions using this hook, see Category:ParserTestGlobals extensions.
Details
- &$globals: Array with all the globals which should be set for parser tests. The arrays keys serve as the globals names, its values are the globals values.
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.