Manual:Hooks/MediaWikiPHPUnitTest::startTest

From MediaWiki.org
Jump to navigation Jump to search
MediaWikiPHPUnitTest::startTest
Available from version 1.32.0 (Gerrit change 455176)
Occurs when a MediaWiki PHPUnit test has started.
Define function:
public static function onMediaWikiPHPUnitTest_startTest( PHPUnit_Framework_Test $test ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"MediaWikiPHPUnitTest::startTest": "MyExtensionHooks::onMediaWikiPHPUnitTeststartTest"
	}
}

For MediaWiki ≤1.25:

$wgHooks['MediaWikiPHPUnitTest::startTest'][] = 'MyExtensionHooks::onMediaWikiPHPUnitTeststartTest';
Called from:File(s): ../tests/phpunit/MediaWikiPHPUnitTestListener.php
Function(s): startTest

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

Details[edit]

  • $test: A PHPUnit_Framework_Test object

See also[edit]