write('vendor/pestphp/pest/.temp/.gitkeep', ''); $project->write($testFile, <<<'FIXTURE' toBeTrue(); })->only('named-focus'); test('runs an independent Pest invocation', function (): void { foreach ([[], ['--parallel', '--processes=2']] as $arguments) { $process = new Process( [PHP_BINARY, 'vendor/pestphp/pest/bin/pest', 'tests/Unit/GreeterTest.php', '--cache-directory', '.home/nested', ...$arguments], env: ['PARATEST' => '0'], ); $process->mustRun(); expect($process->getOutput())->toContain('2 passed'); } })->only(); test('runs without focus in CI', function (): void { expect(true)->toBeTrue(); }); FIXTURE); $focused = $project->pest($testFile, '--cache-directory', $project->path('.home/focused'), ...$arguments); expect($focused->exitCode)->toBe(0, $focused->describe()) ->and($focused->tally())->toContain('1 passed (2 assertions)'); $ci = $project->pest($testFile, '--ci', '--cache-directory', $project->path('.home/ci'), ...$arguments); expect($ci->exitCode)->toBe(0, $ci->describe()) ->and($ci->tally())->toContain('3 passed'); })->with(Project::SEQUENTIAL_AND_PARALLEL)->group('integration');