propmanager-tdd-phpunit

Guide PHPUnit test writing for Laravel projects with class-based tests.

Updated Feb 13, 2026
One-click install
npx skills add https://github.com/mwathiben/PropManager --skill propmanager-tdd-phpunit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: propmanager-tdd-phpunit
Source: https://github.com/mwathiben/PropManager/tree/main/.claude/skills/propmanager-tdd-phpunit
Command: npx skills add https://github.com/mwathiben/PropManager --skill propmanager-tdd-phpunit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PropManager TDD guidance standardizes how developers write tests for Laravel/PHPUnit projects, reducing ambiguity and speeding up onboarding.

Core Features & Use Cases

  • Clear testing conventions: enforce class-based PHPUnit usage, avoid Pest, and provide a uniform test layout under tests/Unit and tests/Feature.
  • Reusable patterns: required test structure, traits like CreatesTestData and MocksExternalServices, and database handling with RefreshDatabase.
  • Use Case: when adding a new feature or fixing a bug, follow the prescribed test loop (RED, GREEN, REFACTOR) to ensure robust coverage.

Quick Start

Follow the RED, GREEN, REFACTOR loop to add tests and implement features.

Frequently Asked Questions about propmanager-tdd-phpunit

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

FAQPage Schema
How do I structure PHPUnit tests for a Laravel project using TDD?

Structure PHPUnit tests in Laravel using class-based tests organized under tests/Unit and tests/Feature directories, following the RED, GREEN, REFACTOR loop to ensure robust coverage and standardized conventions.

What is the best way to mock external services in Laravel feature tests?

Mock external services in Laravel feature tests by applying the MocksExternalServices trait. This standardizes mocking patterns, isolates dependencies, and ensures consistent endpoint testing workflows across your test suite.

Does this TDD guidance support Pest testing workflows for Laravel?

This TDD guidance does not support Pest; it enforces class-based PHPUnit usage and avoids Pest. It provides a uniform test layout specifically for PHPUnit to standardize Laravel testing conventions and speed up onboarding.

How do I set up test data and handle the database in PHPUnit Laravel tests?

Set up test data and handle databases in PHPUnit Laravel tests using the RefreshDatabase trait and the CreatesTestData trait. These traits provide reusable data setup patterns and ensure a clean database state for each test.

Can I use this testing workflow for both unit and feature tests in Laravel?

Yes, you can use this workflow for both unit and feature tests in Laravel. The guidance covers unit, feature, and browser testing workflows, enforcing consistent endpoint testing patterns and required test traits across all test types.