tdd-with-pest

Installation
SKILL.md

Tdd With Pest (Symfony)

Use when

  • Driving a feature with RED-GREEN-REFACTOR in a project that runs Pest v4 (PHP 8.3+).
  • Writing it() and expect() tests that need the Symfony kernel or an HTTP client.
  • Converting existing PHPUnit class tests to Pest syntax with pest-plugin-drift.
  • Adding a bug-reproducing test to a Pest suite before the fix.

Default workflow

  1. Confirm PHP 8.3+ and Pest v4, then generate tests/Pest.php with ./vendor/bin/pest --init.
  2. Bind the bridge classes in tests/Pest.php: uses(KernelTestCase::class, Factories::class, ResetDatabase::class)->in('Integration') and uses(WebTestCase::class, ...)->in('Functional').
  3. RED: write an it() test with Foundry v2 factories, run ./vendor/bin/pest --filter and check it fails for the right reason.
  4. GREEN: write the minimal code, then REFACTOR and re-run ./vendor/bin/pest.
  5. Gate the suite with --parallel and --coverage --min=80.
Installs
57
GitHub Stars
224
First Seen
Sep 18, 2026