Summary
Add/expand unit tests to raise low coverage in key console command classes.
This is a follow-up coverage ticket after previously completed command coverage work.
Scope
Target files and thresholds:
src/Console/Commands/DebugBarCommand.php from ~35% to >=70%
src/Console/Commands/OpenApiCommand.php from ~37% to >=70%
src/Console/Commands/MigrationMigrateCommand.php from ~45% to >=70%
src/Console/Commands/ResourceCacheClearCommand.php from ~37% to >=70%
src/Console/Commands/ServeCommand.php from ~15% to >=70%
Related tests (expected):
tests/Unit/Console/Commands/**
Goals
- Raise line coverage for each listed file to at least 70%.
- Add behavior-oriented tests (success + failure paths), not synthetic assertions.
- Keep tests deterministic in local and CI environments.
Test quality requirements
- Prefer observable command behavior/output assertions over internals.
- Cover argument/option parsing paths where relevant.
- Cover exception/error handling branches.
- Avoid brittle environment-dependent behavior.
Acceptance criteria
- Coverage report shows each target file at >=70% line coverage.
- New/updated tests pass locally and in CI.
- Validation passes:
vendor/bin/phpunit --coverage-clover coverage.xml
composer phpstan
composer cs:check
Notes
- If any branch cannot realistically reach 70%, document rationale in PR and propose a justified threshold adjustment for that file.
Summary
Add/expand unit tests to raise low coverage in key console command classes.
This is a follow-up coverage ticket after previously completed command coverage work.
Scope
Target files and thresholds:
src/Console/Commands/DebugBarCommand.phpfrom ~35% to >=70%src/Console/Commands/OpenApiCommand.phpfrom ~37% to >=70%src/Console/Commands/MigrationMigrateCommand.phpfrom ~45% to >=70%src/Console/Commands/ResourceCacheClearCommand.phpfrom ~37% to >=70%src/Console/Commands/ServeCommand.phpfrom ~15% to >=70%Related tests (expected):
tests/Unit/Console/Commands/**Goals
Test quality requirements
Acceptance criteria
vendor/bin/phpunit --coverage-clover coverage.xmlcomposer phpstancomposer cs:checkNotes