fix: popArgument drops duplicate arguments breaking --parallel --exclude-gropup= (#1674)

* fix: popArgument drops duplicate arguments breaking --parallel multi-exclude-group

Fixes #1437

* fix: ensure popArgument handles duplicate arguments

* fix: update expected test results and snapshots after rebase

---------

Signed-off-by: nuno maduro <enunomaduro@gmail.com>
Co-authored-by: nuno maduro <enunomaduro@gmail.com>
This commit is contained in:
flap152
2026-06-12 12:58:37 -04:00
committed by GitHub
parent 97714a7088
commit 8467c64c22
5 changed files with 49 additions and 8 deletions

View File

@ -24,7 +24,7 @@ test('parallel', function () use ($run) {
$file = file_get_contents(__FILE__);
$file = preg_replace(
'/\$expected = \'.*?\';/',
"\$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 27 skipped, 1319 passed (2973 assertions)';",
"\$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 27 skipped, 1315 passed (2961 assertions)';",
$file,
);
file_put_contents(__FILE__, $file);
@ -47,3 +47,14 @@ test('parallel reports invalid datasets as failures', function () use ($run) {
->toContain('Tests: 1 failed, 1 passed (1 assertions)')
->toContain('Parallel: 3 processes');
})->skipOnWindows();
test('parallel can have multiple exclude-groups', function () use ($run) {
$singleExclude = $run('--exclude-group=integration');
$doubleExclude = $run('--exclude-group=integration', '--exclude-group=container');
preg_match('/(\d+) passed/', $singleExclude, $singleMatch);
preg_match('/(\d+) passed/', $doubleExclude, $doubleMatch);
expect((int) $doubleMatch[1])->toBeLessThan((int) $singleMatch[1]);
expect($doubleExclude)->toContain('Parallel: 3 processes');
})->skipOnWindows();