# Laravel:testing Database

> Deliver Laravel behavior safely with test-first workflows and deterministic regression protection. Use for testing database tasks.

- Skill: `btafoya/laravel-testing-database` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add btafoya/laravel-testing-database`
- Raw SKILL.md: https://api.skillmd.com/api/skills/btafoya/laravel-testing-database/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: btafoya (https://skillmd.com/u/btafoya)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/btafoya/laravel-testing-database

---


# Testing Database (Laravel)

## Use when
- Implementing new behavior with regression risk.
- Fixing bugs via reproducible failing tests.

## Default workflow
1. Write a failing test for expected behavior and one edge case.
2. Implement minimal code to pass.
2. Refactor for clarity while keeping tests green.
2. Run targeted tests, then broader suite for impacted modules.

## Guardrails
- No behavior change without test evidence.
- Prefer deterministic fixtures and isolated state.
- Assert business outcomes instead of internals.

## Progressive disclosure
- Start with this file for execution posture and constraints.
- Load references only for deep implementation detail or edge cases.

## Output contract
- RED/GREEN/REFACTOR summary.
- Test files changed and command output.
- Remaining coverage gaps.

## References
- `reference.md`
- `docs/complexity-tiers.md`

