Index: includes/bootstrap.php
===================================================================
--- includes/bootstrap.php	(revision 1290)
+++ includes/bootstrap.php	(working copy)
@@ -87,8 +87,8 @@
 /**
  * A child class of the PHP test runner.
  *
- * Not actually used as a runner. Rather, used to access the protected
- * longOptions property, to parse the arguments passed to the script.
+ * Used to access the protected longOptions property, to parse the arguments
+ * passed to the script.
  *
  * If it is determined that phpunit was called with a --group that corresponds
  * to an @ticket annotation (such as `phpunit --group 12345` for bugs marked
@@ -97,13 +97,25 @@
  * If WP_TESTS_FORCE_KNOWN_BUGS is already set in wp-tests-config.php, then
  * how you call phpunit has no effect.
  */
-class WP_PHPUnit_TextUI_Command extends PHPUnit_TextUI_Command {
+class WP_HPUnit_Util_Getopt extends PHPUnit_Util_Getopt {
+	protected $longOptions = array(
+	  'exclude-group=',
+	  'group=',
+	);
 	function __construct( $argv ) {
-		$options = PHPUnit_Util_Getopt::getopt(
-			$argv,
-			'd:c:hv',
-			array_keys( $this->longOptions )
-		);
+		$options = array();
+		while ( list( $i, $arg ) = each( $argv ) ) {
+			try {
+				if ( strlen( $arg ) > 1 && $arg[1] == '-') {
+					PHPUnit_Util_Getopt::parseLongOption( substr( $arg, 2 ), $this->longOptions, $options, $argv );
+				}
+			}
+			catch ( PHPUnit_Framework_Exception $e ) {
+				// Enforcing recognized arguments or correctly formed arguments is
+				// not really the concern here.
+				continue;
+			}
+		}
 		$ajax_message = true;
 		foreach ( $options[0] as $option ) {
 			switch ( $option[0] ) {
@@ -124,4 +136,4 @@
 			echo "Not running ajax tests... To execute these, use --group ajax." . PHP_EOL;
     }
 }
-new WP_PHPUnit_TextUI_Command( $_SERVER['argv'] );
+new WP_HPUnit_Util_Getopt( $_SERVER['argv'] );
