diff --git a/test_old/run.php b/test_old/run.php index c875c87e4a..8ad60ce3ed 100644 --- a/test_old/run.php +++ b/test_old/run.php @@ -26,6 +26,12 @@ function showHelp($error) { ); } +$allowedOptions = [ + '--no-progress' => true, + '--verbose' => true, + '--php-version' => true, +]; + $options = array(); $arguments = array(); @@ -35,7 +41,11 @@ function showHelp($error) { foreach ($argv as $arg) { if ('-' === $arg[0]) { $parts = explode('=', $arg); - $options[$parts[0]] = $parts[1] ?? true; + $name = $parts[0]; + if (!isset($allowedOptions[$name])) { + showHelp("Unknown option \"$name\""); + } + $options[$name] = $parts[1] ?? true; } else { $arguments[] = $arg; }