Allow help and version before the test suite is initialized (#2051)

Co-authored-by: haranishi <223786623+haranishi@users.noreply.github.com>
Co-authored-by: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com>
Co-authored-by: Punyapal Shah <mrpunyapal@gmail.com>
This commit is contained in:
Ikki Nishihara
2026-11-20 18:50:17 +09:00
committed by GitHub
parent f80b3a89a0
commit 67d3733eb2
4 changed files with 31 additions and 9 deletions
+1 -5
View File
@@ -63,7 +63,7 @@ test('a missing tests directory does not crash while resolving tia state', funct
$root = makeInitProject();
try {
$process = runInitProject($root, '--version');
$process = runInitProject($root);
expect($process->getExitCode())->not->toBe(0)
->and($process->getOutput())->toContain('does not exist')
@@ -110,10 +110,6 @@ require {$autoload};
\$arguments = array_slice(\$argv, 1);
if (\$arguments === []) {
\$arguments = ['--version'];
}
\$GLOBALS['_composer_bin_dir'] = getcwd().'/vendor/bin';
\$_SERVER['argv'] = ['pest', ...\$arguments];