laravel-tdd

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

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/mkopcic/md-solutions.hr-racuni-app --skill laravel-tdd-mkopcic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-tdd
Source: https://github.com/mkopcic/md-solutions.hr-racuni-app/tree/main/.github/skills/laravel-tdd
Command: npx skills add https://github.com/mkopcic/md-solutions.hr-racuni-app --skill laravel-tdd-mkopcic

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Laravel projects often suffer from flaky deployments and regressions without a solid test strategy; this skill guides teams to adopt a robust TDD workflow that keeps code clean and maintainable.

Core Features & Use Cases

  • Red-Green-Refactor cycle with PHPUnit and Pest to drive development and ensure high-quality code.
  • Supports unit, feature, and integration tests, with guidance on database handling and test isolation.
  • Recommended defaults for Laravel projects, with clear choices between Pest and PHPUnit based on project standards.

Quick Start

Run php artisan test to start the TDD workflow on your Laravel project.

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 a Laravel TDD workflow with PHPUnit and Pest?

A Laravel TDD workflow enforces the Red-Green-Refactor cycle using Pest by default or PHPUnit based on project standards. Run php artisan test to drive development and ensure high-quality, well-tested code.

What is the best way to handle database isolation during Laravel feature testing?

Laravel feature testing handles database isolation through guided test structures and configurations. The workflow ensures tests run cleanly across unit, feature, and integration layers without causing flaky regressions.

Can I use Pest for testing an existing Laravel project that already uses PHPUnit?

Yes, you can use Pest for testing existing Laravel projects. The workflow uses Pest by default but fully supports PHPUnit when existing project standards dictate it. Both frameworks drive the TDD cycle.

Why should I use test-driven development for Laravel refactoring and bug fixes?

Test-driven development for Laravel refactoring prevents regressions and ensures reliable deployments. It enforces a strict workflow across feature development and bug fixes, keeping code clean and maintainable.

Does Laravel TDD support both unit and integration testing layers?

Yes, Laravel TDD supports unit, feature, and integration testing layers. It applies the test-driven workflow across all architectural changes, ensuring comprehensive coverage for reliable, well-tested code.