rules/php/testing.md
This file extends common/testing.md with PHP specific content.
Use PHPUnit as the default test framework. If Pest is configured in the project, prefer Pest for new tests and avoid mixing frameworks.
vendor/bin/phpunit --coverage-text
# or
vendor/bin/pest --coverage
Prefer pcov or Xdebug in CI, and keep coverage thresholds in CI rather than as tribal knowledge.
If the project uses Inertia.js, prefer assertInertia with AssertableInertia to verify component names and props instead of raw JSON assertions.
See skill: tdd-workflow for the repo-wide RED -> GREEN -> REFACTOR loop.
See skill: laravel-tdd for Laravel-specific testing patterns (PHPUnit and Pest).