Manual:Hooks/MediaWikiPHPUnitTest::startTest

From Linux Web Expert

MediaWikiPHPUnitTest::startTest
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 455176)</tvar></translate>
<translate> Removed in <tvar name=1><translate> version <tvar (Gerrit change 673705)</tvar></translate>
Occurs when a MediaWiki PHPUnit test has started.
<translate> Define function:</translate>
public static function onMediaWikiPHPUnitTest_startTest( PHPUnit_Framework_Test $test ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"MediaWikiPHPUnitTest::startTest": "MediaWiki\\Extension\\MyExtension\\Hooks::onMediaWikiPHPUnitTeststartTest"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> ../tests/phpunit/MediaWikiPHPUnitTestListener.php
<translate> Function(s):</translate> startTest
<translate> Interface:</translate> MediaWikiPHPUnitTest__startTestHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:MediaWikiPHPUnitTest::startTest extensions</tvar>.</translate>


Details

  • $test: A PHPUnit_Framework_Test object

See also