laravel-tdd

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

Updated Jul 8, 2026
One-click install
npx skills add https://github.com/nazrulsoftwaredev/NIT_CRM_2 --skill laravel-tdd-nazrulsoftwaredev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-tdd
Source: https://github.com/nazrulsoftwaredev/NIT_CRM_2/tree/main/.agents/skills/laravel-tdd
Command: npx skills add https://github.com/nazrulsoftwaredev/NIT_CRM_2 --skill laravel-tdd-nazrulsoftwaredev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the complexity of maintaining high-quality, bug-free Laravel applications by providing a structured framework for Test-Driven Development (TDD).

Core Features & Use Cases

  • Comprehensive Testing Suite: Includes configurations for PHPUnit and Pest to handle unit, feature, and API testing.
  • Factory-Driven Data: Simplifies database state management using model factories for rapid test setup.
  • Mocking & Fakes: Provides patterns for isolating code by mocking external services like HTTP, Mail, Notifications, and Queues.
  • Use Case: Use this skill to implement a new API endpoint by first writing a failing feature test, then building the controller and model logic until the test passes.

Quick Start

Use the laravel-tdd skill to generate a new feature test for the User registration controller using the provided factory patterns.

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 workflows in Laravel?

To implement Laravel test-driven development, start by writing a failing feature test for your API endpoint, then build the controller and model logic until the test passes. This skill facilitates creating unit, feature, and API tests while managing database states.

What is the best way to manage database states during PHPUnit testing?

The best way to manage database states during PHPUnit testing is using model factories. Factory-driven data simplifies rapid test setup and teardown, ensuring reliable automated testing for controllers and models without manual database seeding.

How do I mock external services like HTTP and Mail in Pest?

Mock external services in Pest by applying provided mocking and fakes patterns. This isolates your code by mocking HTTP, Mail, Notifications, and Queues, ensuring reliable automated testing without triggering actual external service integrations.

Does this Laravel TDD skill support both PHPUnit and Pest configurations?

Yes, this Laravel TDD skill supports both PHPUnit and Pest configurations. It provides a comprehensive testing suite to handle unit, feature, and API testing using either framework, ensuring code reliability through automated testing.

Can I use model factories to test Laravel API endpoints?

Yes, you can use model factories to test Laravel API endpoints. Factory-driven data simplifies database state management for rapid test setup, allowing you to write a failing feature test for your controller before building the API logic.