From 6e80f7cebf06526df35fd62fda0ad3b753c4c157 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 28 Jan 2019 18:49:22 +0000 Subject: [PATCH] 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 --- tests/phpunit/includes/bootstrap.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/phpunit/includes/bootstrap.php b/tests/phpunit/includes/bootstrap.php index 427e5d8289..441c029c93 100644 --- a/tests/phpunit/includes/bootstrap.php +++ b/tests/phpunit/includes/bootstrap.php @@ -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'] );