laravel-tdd

Generate PHPUnit and Pest tests for Laravel applications with TDD workflows.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/luongldptit/move-ticket --skill laravel-tdd-luongldptit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-tdd
Source: https://github.com/luongldptit/move-ticket/tree/main/.agent/skills/laravel-tdd
Command: npx skills add https://github.com/luongldptit/move-ticket --skill laravel-tdd-luongldptit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the friction of setting up and maintaining high-quality, high-coverage test suites for Laravel applications, reducing production bugs and cutting down time spent on manual regression testing.

Core Features & Use Cases

  • Multi-framework TDD support: Works with both PHPUnit and Pest, adapting to existing project standards or defaulting to Pest for new codebases.
  • Comprehensive test layer guidance: Covers unit, feature, and integration tests for Eloquent models, HTTP endpoints, authentication, policies, jobs, and notifications.
  • Use Case: When building a new Laravel API endpoint, use this Skill to follow the red-green-refactor cycle, write failing tests first, implement minimal logic to pass, and refactor while keeping tests green to meet 80%+ coverage targets.

Quick Start

Use the laravel-tdd skill to write a passing Pest feature test for a new Laravel API endpoint that creates a project resource with authentication and validation checks.

Frequently Asked Questions about laravel-tdd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up test-driven development for a new Laravel API endpoint?

Laravel TDD workflows guide you through the red-green-refactor cycle to write failing Pest or PHPUnit tests first, implement minimal logic to pass, and refactor while keeping tests green to achieve 80%+ coverage.

Does this Laravel testing workflow support both Pest and PHPUnit?

Yes, the Laravel TDD workflow supports both Pest and PHPUnit frameworks, automatically adapting to existing project standards or defaulting to Pest for new codebases to ensure consistent test coverage.

What's the best way to test Eloquent models and authentication in Laravel?

The best way is using standardized TDD workflows that provide comprehensive test layer guidance for Eloquent models, authentication, policies, HTTP endpoints, and background jobs to eliminate low-coverage test suites.

How do I achieve 80% test coverage for my Laravel application?

You can achieve 80% test coverage by applying standardized TDD workflows that enforce database testing best practices, isolate external service dependencies, and require combined unit and feature test coverage targets.

How do I isolate external services during Laravel test execution?

To isolate external services during Laravel test execution, the TDD workflow applies database testing best practices and dependency isolation techniques to ensure tests run consistently without hitting third-party integrations.