From: Max Semenik Date: Fri, 25 Jun 2010 16:19:25 +0000 (+0000) Subject: Follow-up to r68544: restored the ability to run tests from separate files X-Git-Tag: 1.31.0-rc.0~36382 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=3ea2c6e57382551130d49ba5087b630e0489ccc6;p=lhc%2Fweb%2Fwiklou.git Follow-up to r68544: restored the ability to run tests from separate files --- diff --git a/maintenance/tests/phpunit b/maintenance/tests/phpunit index 1e477fe747..b893847503 100755 --- a/maintenance/tests/phpunit +++ b/maintenance/tests/phpunit @@ -26,9 +26,14 @@ EOF; class MWPHPUnitCommand extends PHPUnit_TextUI_Command { protected function handleCustomTestSuite() { - require( dirname( __FILE__ ) . '/TestFileList.php' ); $suite = new PHPUnit_Framework_TestSuite; - foreach ( $testFiles as $file ) { + if ( !empty( $this->options[1] ) ) { + $files = $this->options[1]; + } else { + require( dirname( __FILE__ ) . '/TestFileList.php' ); + $files = $testFiles; + } + foreach ( $files as $file ) { $suite->addTestFile( $file ); } $suite->setName( 'MediaWiki test suite' ); diff --git a/maintenance/tests/phpunit.bat b/maintenance/tests/phpunit.bat index c7234c11db..c8aa581e1f 100644 --- a/maintenance/tests/phpunit.bat +++ b/maintenance/tests/phpunit.bat @@ -1 +1 @@ -@php phpunit \ No newline at end of file +@php phpunit %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file