Manual:Hooks/ParserTestTables

From MediaWiki.org
Jump to: navigation, search
ParserTestTables
Available from version 1.10.0
alter the list of tables to duplicate when parser tests are run. Use when page save hooks require the presence of custom tables to ensure that tests continue to run properly.
Define function:
public static function onParserTestTables( &$tables ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ParserTestTables": [
			"MyExtensionHooks::onParserTestTables"
		]
	}
}

For MediaWiki ≤1.25:

$wgHooks['ParserTestTables'][] = 'MyExtensionHooks::onParserTestTables';
Called from: File(s): parserTests.inc

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:ParserTestTables extensions.

Details[edit]

  • &$tables: array of table names