fix: beforeEach/afterEach leaking into sibling describe blocks with same nested name (#1850)

* fix: beforeEach/afterEach leaking into sibling describe blocks with same nested name

* fix: resolve afterEach test ordering issue

* chore: update snapshots and parallel memory limit after rebase onto upstream/5.x

* chore: update snapshots and parallel memory limit after rebase onto upstream/5.x

---------

Co-authored-by: Adam Goulding <adam.goulding@ethixbase360.com>
Co-authored-by: Punyapal Shah <mrpunyapal@gmail.com>
This commit is contained in:
Adam Goulding
2026-11-20 13:44:17 +00:00
committed by GitHub
parent 41af35a3f2
commit f5c3687a68
7 changed files with 80 additions and 12 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ use Symfony\Component\Process\Process;
$run = function (): ?string {
$process = new Process(
array_merge(['php', 'bin/pest', '--parallel', '--processes=3'], func_get_args()),
array_merge(['php', '-d', 'memory_limit=512M', 'bin/pest', '--parallel', '--processes=3', '--passthru-php=-d memory_limit=512M'], func_get_args()),
dirname(__DIR__, 2),
['COLLISION_PRINTER' => 'DefaultPrinter', 'COLLISION_IGNORE_DURATION' => 'true', 'PAO_DISABLE' => '1'],
);
@@ -21,7 +21,7 @@ test('parallel', function () use ($run): void {
$output = implode("\n", array_slice(explode("\n", (string) $output), -10));
$profileOutput = $run('tests/Fixtures/Suites/SuccessOnly.php', '--profile');
$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 30 skipped, 1753 passed (3791 assertions)';
$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 30 skipped, 1759 passed (3800 assertions)';
expect($output)
->toContain("Tests: {$expected}")