What problem does it solve?
Provides a practical test-driven development workflow for Laravel projects so developers can write reliable, maintainable tests that drive implementation and prevent regressions.
Core Features & Use Cases
- Red-Green-Refactor Cycle: Encourages writing a failing test first, implementing the minimal change, and refactoring with tests green.
- Layered Testing Guidance: Distinguishes unit, feature, and integration tests and when to use each for models, services, HTTP endpoints, jobs, and policies.
- Database and Fixture Strategies: Recommends RefreshDatabase, DatabaseTransactions, factory-driven fixtures, and fakes for queues, mail, notifications, and external HTTP calls.
- Framework Choices and CI: Prefers Pest for new tests with compatibility notes for PHPUnit and guidance on coverage targets and test configuration for CI.
- Use Case: Quickly scaffold deterministic feature tests for a new API endpoint with authentication, validation, and database assertions.
Quick Start
Use the laravel-tdd skill to write a failing feature test for your new endpoint, implement the minimal code to pass, and run tests with RefreshDatabase enabled.