Stop mocking everything
summary
Claim: stop mocking everything and prefer real implementations where possible. Live PHP code using PHPUnit and PHPSpec builds an overdue invoices calculator with three test invoices, applies 10% interest after 7 days, and shows how mocks force brittle one-to-one coupling: added interactions, nullable due dates, and repo method changes break unrelated tests. A real-memory repo catches a real bug instead of hiding it. Mocks remain recommended for file system database network legacy or costly object-creation scenarios.
AI-written summary · about
chapters (6)
- 0:00Start
- 9:16Php Spec Test
- 12:56Test Code with the Real Implementation
- 23:32New Test Code and New Behavior of Calculator
- 49:06Summary
- 53:24How Do You Come Up with a Talk








