fix: let extensions register event subscribers in --parallel mode (#2002)

Co-authored-by: Aleksandr Štšepelin <as@jp.ee>
Co-authored-by: Punyapal Shah <mrpunyapal@gmail.com>
Co-authored-by: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com>
This commit is contained in:
ChrisAbner
2026-11-03 10:51:33 -05:00
committed by GitHub
parent e5906a50cf
commit 9a77ff6b96
7 changed files with 62 additions and 3 deletions
+15
View File
@@ -38,6 +38,21 @@ test('parallel reports invalid datasets as failures', function () use ($run): vo
->toContain('Parallel: 3 processes');
})->skipOnWindows();
test('parallel lets extensions register event subscribers', function (): void {
$process = new Process(
['php', 'bin/pest', '--configuration', 'tests/Fixtures/Suites/ParallelExtensionSubscriber.xml', '--parallel', '--processes=2'],
dirname(__DIR__, 2),
['COLLISION_PRINTER' => 'DefaultPrinter', 'COLLISION_IGNORE_DURATION' => 'true', 'PAO_DISABLE' => '1'],
);
$process->run();
expect($process->getExitCode())->toBe(0)
->and(removeAnsiEscapeSequences($process->getOutput()))
->not->toContain('failed')
->toContain('Parallel: 2 processes');
})->skipOnWindows();
test('parallel can have multiple exclude-groups', function () use ($run): void {
$singleExclude = $run('--exclude-group=integration');
$doubleExclude = $run('--exclude-group=integration', '--exclude-group=container');