laravel-tdd

Implement test-driven development workflows for Laravel with PHPUnit and Pest.

1|Updated Apr 6, 2026
One-click install
npx skills add https://github.com/vrcms/everything-qwen-code --skill laravel-tdd-vrcms
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-tdd
Source: https://github.com/vrcms/everything-qwen-code/tree/main/.qwen/skills/laravel-tdd
Command: npx skills add https://github.com/vrcms/everything-qwen-code --skill laravel-tdd-vrcms

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the challenge of maintaining high code quality and reliability in Laravel applications by enforcing a structured Test-Driven Development (TDD) cycle.

Core Features & Use Cases

  • Red-Green-Refactor Cycle: Provides a standardized framework for writing failing tests, implementing minimal code, and refactoring.
  • Multi-Layer Testing: Supports Unit, Feature, and Integration testing strategies to cover business logic, HTTP endpoints, and database interactions.
  • Use Case: When building a new API endpoint, use this skill to generate the corresponding Pest or PHPUnit test, ensuring the feature is verified against database states and authentication requirements before implementation.

Quick Start

Use the laravel-tdd skill to generate a feature test for a new user registration endpoint using Pest.

Frequently Asked Questions about laravel-tdd

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

FAQPage Schema
How do I implement test-driven development in Laravel using Pest?

Laravel test-driven development is implemented by structuring your workflow into a Red-Green-Refactor cycle, writing failing Pest tests first, implementing minimal code, and refactoring. This ensures high code quality and reliability for business logic.

How do I test Eloquent models and HTTP controllers in a Laravel TDD workflow?

Testing Eloquent models and HTTP controllers requires a multi-layer testing strategy that covers unit, feature, and integration tests. This verifies HTTP endpoints and database interactions while enforcing 80% code coverage through automated testing.

Can I use PHPUnit alongside Pest for Laravel feature testing?

PHPUnit and Pest are both supported for Laravel feature testing. The workflow allows you to generate tests for new API endpoints using either framework, verifying features against database states and authentication requirements before implementation.

What is the best way to manage database state during Laravel integration testing?

Managing database state during Laravel integration testing is handled through automated testing strategies within the TDD workflow. This ensures that external service integrations and database interactions are verified consistently across unit and feature tests.

Does Laravel TDD support testing external service integrations?

Testing external service integrations is fully supported through integration testing strategies. The workflow ensures these external dependencies are verified against database states and authentication requirements during the Red-Green-Refactor cycle.

Why do I need a structured TDD cycle for my Laravel application testing?

A structured TDD cycle addresses the challenge of maintaining high code quality and reliability in Laravel applications. It provides a standardized framework for writing failing tests, implementing minimal code, and refactoring to achieve 80% coverage.