Added a new hook that allows extensions to add their own tests to the core test suite
authorMax Semenik <maxsem@users.mediawiki.org>
Mon, 28 Jun 2010 18:17:47 +0000 (18:17 +0000)
committerMax Semenik <maxsem@users.mediawiki.org>
Mon, 28 Jun 2010 18:17:47 +0000 (18:17 +0000)
docs/hooks.txt
maintenance/tests/phpunit

index 7c33018..cbc08f7 100644 (file)
@@ -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
index b893847..bab4439 100755 (executable)
@@ -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 );