What problem does it solve?
Prevents PHP changes from being accepted without evidence by enforcing correct PHPUnit test structure, safe test doubles, proper database isolation, and repeatable verification.
Core Features & Use Cases
- Unit testing patterns: Uses PHPUnit conventions like
TestCase, consistent setup/teardown, and clear assertions.
- Table-driven test coverage: Encourages
@dataProvider to reduce duplication while expanding scenario coverage.
- Test doubles and database isolation: Guides stubs/mocks/Prophecy usage and recommends rollback-based database strategies.
- Verification gates: Standardizes how to run PHPUnit and (optionally) enforce coverage thresholds for evidence-based completion.
Quick Start
Ask the AI to write a complete PHPUnit test suite for your PHP class, including mocks or stubs for collaborators, table-driven cases with data providers, and a PHPUnit command to verify the results.