From 7f12b94750cc2e36ba6ff6fe1f0527d91a80f39f Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Mon, 28 Jun 2010 18:17:47 +0000 Subject: [PATCH] Added a new hook that allows extensions to add their own tests to the core test suite --- docs/hooks.txt | 3 +++ maintenance/tests/phpunit | 1 + 2 files changed, 4 insertions(+) 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 ); -- 2.20.1