Skip to content

add command/tools test suite passing phpstan level 9#2

Merged
kuaukutsu merged 3 commits into
mainfrom
feature/test-suite
May 15, 2026
Merged

add command/tools test suite passing phpstan level 9#2
kuaukutsu merged 3 commits into
mainfrom
feature/test-suite

Conversation

@kuaukutsu

Copy link
Copy Markdown
Member

Introduce PHPUnit tests for cmd presentation commands and console output tools, with hand-written fakes. All test code is clean under phpstan level 9 (src + tests + example):

  • FakeConsoleOutput: type iterable messages per Symfony contract
  • CommandOptionsTest: route nullable capturedOptions through a typed assertNotNull helper
  • PrettyConsoleOutputTest: non-empty-string action matching the event
  • TraceConsoleOutputTest: fresh fake per case instead of array reset

Introduce PHPUnit tests for cmd presentation commands and console
output tools, with hand-written fakes. All test code is clean under
phpstan level 9 (src + tests + example):

- FakeConsoleOutput: type iterable<string> messages per Symfony contract
- CommandOptionsTest: route nullable capturedOptions through a typed
  assertNotNull helper
- PrettyConsoleOutputTest: non-empty-string action matching the event
- TraceConsoleOutputTest: fresh fake per case instead of array reset

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kuaukutsu kuaukutsu self-assigned this May 15, 2026
kuaukutsu and others added 2 commits May 15, 2026 20:13
CommandOptions is a trait, so #[CoversClass] reported it as an invalid
coverage target and failed the suite under failOnWarning. Switch to
#[CoversTrait].

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kuaukutsu kuaukutsu merged commit e7f78e0 into main May 15, 2026
4 checks passed
@kuaukutsu kuaukutsu deleted the feature/test-suite branch May 15, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant