What problem does it solve?
Writing tests for Laravel applications is often inconsistent, time-consuming, and fails to catch regressions, leading to fragile code that breaks unexpectedly during feature updates or refactors when teams lack standardized testing practices.
Core Features & Use Cases
- Dual framework support: Works with both PHPUnit and Pest, defaulting to Pest for new Laravel projects to reduce boilerplate.
- Comprehensive test coverage guidance: Includes best practices for unit, feature, and integration tests covering Eloquent models, HTTP endpoints, authentication, queues, jobs, and notifications.
- Built-in testing utilities: Pre-configured database testing strategies (RefreshDatabase, DatabaseTransactions), fakes for queues, mail, and external APIs, and 80%+ coverage targets to ensure reliable, maintainable code.
- Real-world use case: For a Laravel SaaS app, use this skill to write feature tests for new user onboarding endpoints, fake payment gateway calls to avoid hitting real services, and validate that welcome emails are dispatched correctly without sending actual messages.
Quick Start
Use the laravel-tdd skill to write a passing Pest feature test for a new Laravel API endpoint that creates a project, including database assertions and authenticated user checks.