r68673 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68672‎ | r68673 | r68674 >
Date:18:17, 28 June 2010
Author:maxsem
Status:ok
Tags:
Comment:
Added a new hook that allows extensions to add their own tests to the core test suite
Modified paths:
  • /trunk/phase3/docs/hooks.txt (modified) (history)
  • /trunk/phase3/maintenance/tests/phpunit (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/tests/phpunit
@@ -32,6 +32,7 @@
3333 } else {
3434 require( dirname( __FILE__ ) . '/TestFileList.php' );
3535 $files = $testFiles;
 36+ wfRunHooks( 'UnitTestsList', array( &$files ) );
3637 }
3738 foreach ( $files as $file ) {
3839 $suite->addTestFile( $file );
Index: trunk/phase3/docs/hooks.txt
@@ -1595,6 +1595,9 @@
15961596 $action: action name
15971597 $article: article "acted on"
15981598
 1599+'UnitTestsList': Called when building a list of files with PHPUnit tests
 1600+&$files: list of files
 1601+
15991602 'UnwatchArticle': before a watch is removed from an article
16001603 $user: user watching
16011604 $article: article object to be removed

Status & tagging log