Lightning fast tests
summary
Shows how a Mastermind game is built with TDD to keep test runs in seconds: unit tests cover domain logic, only adapters get integration tests, and the heavy parts are swapped for in‑memory versions. Uses PHP 5.6/7, PHPUnit and Prophecy mocking for fast doubles, introduces a decoding boards repository interface and a session adapter that is the single place touching Symfony session. The design reduces end‑to‑end tests and keeps the suite fast and reliable.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 3:20Workshop setup
- 9:37Mastermind game design
- 14:16Code Peg class exercise
- 19:12Stubbing and test doubles
- 31:55Dependency inversion principle
- 45:08Dependency injection vs inversion
- 53:50Final exercise
- 56:05Test pyramid and architecture
- 1:02:53Q&A and closing
related talks
40mMy Symfony functional testing toolbox
36mTest driven development in Drupal 8
59mYour tests are mocking you
29mEffective tests and testing effectively
50mBuilding Testable PHP Applications
49mTesting for the Brave and True
01h 44mCode like a pro
45mShipping Better Software Faster, and Having Fun Doing It
