test-doubles-mocking · git:20261005.042befb · 2026-10-05 · sha256 2f3a3637b84e891b

test-doubles-mocking git:20261005.042befbA

Immutable. This exact content never changes and is served at /api/v1/blob/2f3a3637b84e891b.

---
name: test-doubles-mocking
description: Create test doubles with PHPUnit mocks for isolated unit testing in Symfony
capabilities: [read, search]
tags: [testing]
# projected by `bun run build` — do not edit by hand
allowed-tools:
  - Read
  - Glob
  - Grep
---

# Test Doubles Mocking (Symfony)

## Use when
- Building regression-safe behavior with TDD/functional/e2e tests.
- Converting bug reports into executable failing tests.

## Default workflow
1. Write failing test for target behavior and one boundary case.
2. Implement minimal code to pass.
3. Refactor while preserving green suite.
4. Broaden coverage for invalid/unauthorized/not-found paths.

## Guardrails
- Prefer deterministic fixtures/builders.
- Assert observable behavior, not internal implementation.
- Keep tests isolated and stable in CI.

## Progressive disclosure
- Use this file for execution posture and risk controls.
- Open references when deep implementation details are needed.

## Output contract
- RED/GREEN/REFACTOR trace.
- Test files changed and executed commands.
- Coverage and confidence notes.

## References
- `reference.md`