mirror of
https://github.com/pestphp/pest.git
synced 2026-12-05 23:32:17 +01:00
fix: allow --init without a tests directory (#1939)
* fix: allow --init without a tests directory Boot aborted before TIA state was registered, and shutdown then tried to construct the plugin. That hid the real error behind "State cannot be resolved" on a fresh install. Closes #1934 * fix: detect --init anywhere in the arguments Flags before --init were still treated as a normal run and failed when tests/ did not exist. * fix: drop duplicate Kernel::$booted and share --init check 5.3.1 already gates plugin termination on boot, so the rebase must not declare $booted again. --init and --init=value now share HandleArguments::hasArgument, and the success snapshot includes the new init tests. * test: fix init suite expectations Parallel total omitted the four --init tests, which failed the success snapshot. Rector requires toBeFile(). --------- Co-authored-by: Tiago Santos <tsantos@lynixt.pt>
This commit is contained in:
@@ -20,7 +20,7 @@ test('parallel', function () use ($run): void {
|
||||
$output = $run('--exclude-group=integration');
|
||||
$output = implode("\n", array_slice(explode("\n", (string) $output), -10));
|
||||
|
||||
$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 27 skipped, 1594 passed (3461 assertions)';
|
||||
$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 27 skipped, 1598 passed (3482 assertions)';
|
||||
|
||||
expect($output)
|
||||
->toContain("Tests: {$expected}")
|
||||
|
||||
Reference in New Issue
Block a user