Jump to content

Manual:Hooks/ParserTestTables

From mediawiki.org
ParserTestTables
Available from version 1.10.0
Removed in version 1.41.0 (Gerrit change 963115)
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( array &$tables ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ParserTestTables": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserTestTables"
	}
}
Called from: File(s): ../tests/parser/ParserTestRunner.php
Interface: ParserTestTablesHook.php

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