wiki.techinc.nl/includes/Hook/ParserTestTablesHook.php
C. Scott Ananian 665eae14ac ParserTestRunner: share more code w/ MediaWikiIntegrationTestCase
Refactor the database setup code to share more code between
ParserTestRunner and MediaWikiIntegrationTestCase.  Made
`::setupAllTestDBs` static so it can be reused from
ParserTestRunner.

Made ParserTestRunner::addArticle more like
MediaWikiIntegrationTestCase::addCoreDBData().  Some additional
refactoring work could be done here in the future to share more code.

After the refactoring the ParserTestTables hook is no longer necessary
and so has been (soft) deprecated.  MediaWikiIntegrationTestCase
clones all database tables, so ParserTestRunner no longer needs to ask
extensions for a list of specific tables it should clone.  Cleaning up
the handful of extensions which define this hook will be left to a
future patch set.

Change-Id: I5124789fac333a664b73b4b4a1e801ecc0a618ca
2021-01-07 23:31:12 -05:00

25 lines
726 B
PHP

<?php
namespace MediaWiki\Hook;
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "ParserTestTables" to register handlers implementing this interface.
*
* @stable to implement
* @ingroup Hooks
* @deprecated No longer invoked by MW 1.36+
*/
interface ParserTestTablesHook {
/**
* Use this hook to 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.
*
* @since 1.35
*
* @param string[] &$tables Array of table names
* @return bool|void True or no return value to continue or false to abort
*/
public function onParserTestTables( &$tables );
}