Follow-up to r68544: restored the ability to run tests from separate files
authorMax Semenik <maxsem@users.mediawiki.org>
Fri, 25 Jun 2010 16:19:25 +0000 (16:19 +0000)
committerMax Semenik <maxsem@users.mediawiki.org>
Fri, 25 Jun 2010 16:19:25 +0000 (16:19 +0000)
maintenance/tests/phpunit
maintenance/tests/phpunit.bat

index 1e477fe..b893847 100755 (executable)
@@ -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' );
index c7234c1..c8aa581 100644 (file)
@@ -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