The Absolute Beginner's Guide To Test-Driven Development
summary
Shows step-by-step TDD using PHP with PHPUnit and Docker, building a shopping cart example: tests first for an empty cart, adding a product, then refusing duplicate products by throwing a cannot add multiple exception. Demonstrates a small Product value object with equality logic, refactors safely, and claims natural 100% coverage during red‑green‑refactor cycles. Covers when to write unit vs integration vs E2E tests, common smells (brittle getters, overused data providers), and practical rules for maintainable tests.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:44Audience testing experience
- 3:09TDD misconceptions
- 4:57Testing triangle
- 8:44TDD setup with PHP
- 10:10First shopping cart test
- 14:03Shopping cart behavior
- 16:55Adding business rules
- 20:44Refactoring value objects
- 27:09Testing mistakes and smells
- 33:05TDD best practices








