Add parsertest specific help to PHPUnit.php
authorX! <soxred93@users.mediawiki.org>
Sat, 1 Jan 2011 06:49:00 +0000 (06:49 +0000)
committerX! <soxred93@users.mediawiki.org>
Sat, 1 Jan 2011 06:49:00 +0000 (06:49 +0000)
tests/phpunit/MediaWikiPHPUnitCommand.php
tests/phpunit/includes/parser/NewParserTest.php

index 8a6665c..6ca9976 100644 (file)
@@ -4,13 +4,10 @@ class MediaWikiPHPUnitCommand extends PHPUnit_TextUI_Command {
        
        static $additionalOptions = array( 
                'regex=' => false, 
-               'record' => false,
                'file=' => false,
                'keep-uploads' => false,
        );
        
-       //Fixme: These aren't shown on the --help menu
-
        public function __construct() {
                foreach( self::$additionalOptions as $option => $default ) {
                        $this->longOptions[$option] = $option . 'Handler';
@@ -31,4 +28,19 @@ class MediaWikiPHPUnitCommand extends PHPUnit_TextUI_Command {
                }
        }
        
+       public function showHelp() {
+               parent::showHelp();
+               
+               print <<<EOT
+
+ParserTest-specific options:
+
+  --regex="<regex>"        Only run parser tests that match the given regex
+  --file="<filename>"      Prints the version and exits.
+  --keep-uploads           Re-use the same upload directory for each test, don't delete it
+  
+
+EOT;
+       }
+       
 }
index 68dd5e6..8292cad 100644 (file)
@@ -24,10 +24,6 @@ class NewParserTest extends MediaWikiTestCase {
                
                //Setup CLI arguments
                if ( $this->getCliArg( 'regex=' ) ) {
-                       if ( $this->getCliArg( 'record' ) ) {
-                               echo "Warning: --record cannot be used with --regex, disabling --record\n";
-                               $this->setCliArg( 'record', false );
-                       }
                        $this->regex = $this->getCliArg( 'regex=' );
                } else {
                        # Matches anything