From: Max Semenik Date: Mon, 28 Jun 2010 18:17:47 +0000 (+0000) Subject: Added a new hook that allows extensions to add their own tests to the core test suite X-Git-Tag: 1.31.0-rc.0~36360 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=7f12b94750cc2e36ba6ff6fe1f0527d91a80f39f;p=lhc%2Fweb%2Fwiklou.git Added a new hook that allows extensions to add their own tests to the core test suite --- diff --git a/docs/hooks.txt b/docs/hooks.txt index 7c33018372..cbc08f781c 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1595,6 +1595,9 @@ $rev: revision (object) that will be viewed $action: action name $article: article "acted on" +'UnitTestsList': Called when building a list of files with PHPUnit tests +&$files: list of files + 'UnwatchArticle': before a watch is removed from an article $user: user watching $article: article object to be removed diff --git a/maintenance/tests/phpunit b/maintenance/tests/phpunit index b893847503..bab4439334 100755 --- a/maintenance/tests/phpunit +++ b/maintenance/tests/phpunit @@ -32,6 +32,7 @@ class MWPHPUnitCommand extends PHPUnit_TextUI_Command { } else { require( dirname( __FILE__ ) . '/TestFileList.php' ); $files = $testFiles; + wfRunHooks( 'UnitTestsList', array( &$files ) ); } foreach ( $files as $file ) { $suite->addTestFile( $file );