Skip to content

test(rules): add PHPUnit test suite for all PHPStan rules#14

Merged
kojiromike merged 1 commit intomainfrom
rules-tests
Jan 17, 2026
Merged

test(rules): add PHPUnit test suite for all PHPStan rules#14
kojiromike merged 1 commit intomainfrom
rules-tests

Conversation

@kojiromike
Copy link
Contributor

@kojiromike kojiromike commented Jan 17, 2026

Summary

  • Add comprehensive PHPUnit test suite for all 9 PHPStan rules
  • Configure CI workflow for automated test execution
  • Minor fix to ControllersMustReturnResponseRule for better testability

Test plan

  • All 19 tests pass locally (composer test)
  • PHPStan analysis passes (composer phpstan)
  • Code style checks pass (composer phpcs)
  • CI workflow runs successfully on PR

🤖 Generated with Claude Code

Add comprehensive testing infrastructure using PHPStan's RuleTestCase:

- Add PHPUnit 11 and test configuration
- Create tests for all 9 PHPStan rules with fixtures
- Add CI workflow for automated testing
- Fix ControllersMustReturnResponseRule to use AST-based void detection

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@kojiromike kojiromike merged commit f480ad7 into main Jan 17, 2026
14 checks passed
@kojiromike kojiromike deleted the rules-tests branch January 17, 2026 19:51
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

Comments