When to Apply: Reference when writing PHP unit tests, using data providers for parameterized tests, mocking with createMock or Mockery, or testing Laravel/Symfony HTTP controllers. Triggers on "PHPUnit", "TestCase PHP", "assertEquals PHP", "PHP test".
Playbook Deep Dive (11 sections): §1 Project Setup & Configuration · §2 Test Patterns — Assertions & Data Providers · §3 Mocking — createMock, Mockery, Prophecy · §4 Test Doubles — Stubs, Fakes & In-Memory · §5 Faker & Fixtures · §6 Exception & Error Testing · §7 HTTP & API Testing (Symfony/Laravel) · §8 Database Testing · §9 CI/CD Integration · §10 Debugging Table · §11 Best Practices
The agent loads from 2 on-demand reference files (advanced-patterns.md, playbook.md) containing detailed implementation guides, cloud integration patterns, debugging tables, and language-specific best practices.