diff --git a/tests/phpunit/includes/bootstrap.php b/tests/phpunit/includes/bootstrap.php index 1450736fd1..2bb428d74c 100644 --- a/tests/phpunit/includes/bootstrap.php +++ b/tests/phpunit/includes/bootstrap.php @@ -132,7 +132,9 @@ class WP_PHPUnit_Util_Getopt extends PHPUnit_Util_Getopt { function __construct( $argv ) { array_shift( $argv ); $options = array(); - while ( list( $i, $arg ) = each( $argv ) ) { + while ( current( $argv ) ) { + $arg = current( $argv ); + next( $argv ); try { if ( strlen( $arg ) > 1 && $arg[0] === '-' && $arg[1] === '-' ) { PHPUnit_Util_Getopt::parseLongOption( substr( $arg, 2 ), $this->longOptions, $options, $argv );