Build/Test Tools: Don't throw an exception for unrecognized options in WP_PHPUnit_Util_Getopt::parseLongOption().

The method is only used for two known options: `group` and `exclude-group`, others should be passed to PHPUnit.

Props johnbillion.
See #43218.

git-svn-id: https://develop.svn.wordpress.org/trunk@44707 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2019-01-28 18:49:22 +00:00
parent 4254a35ad8
commit 6e80f7cebf

View File

@ -153,7 +153,6 @@ class WP_PHPUnit_Util_Getopt {
protected $longOptions = array(
'exclude-group=',
'group=',
'verbose=',
);
function __construct( $argv ) {
array_shift( $argv );
@ -274,8 +273,6 @@ class WP_PHPUnit_Util_Getopt {
return;
}
throw new Exception( "unrecognized option --$opt" );
}
}
new WP_PHPUnit_Util_Getopt( $_SERVER['argv'] );