From 3ea2c6e57382551130d49ba5087b630e0489ccc6 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Fri, 25 Jun 2010 16:19:25 +0000 Subject: [PATCH] Follow-up to r68544: restored the ability to run tests from separate files --- maintenance/tests/phpunit | 9 +++++++-- maintenance/tests/phpunit.bat | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) 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 -- 2.20.1