Buy tickets for the next conference PHP fwdays'24 conference!

Avoiding Mockageddon

Talk video

Talk presentation

When we do not want to use a real dependency in a (unit) test then we can replace it with a test double. PHPUnit as well as third-party libraries such a Prophecy or Mockery make it convenient to create these stubs, spies, or mocks. Maybe they make it too convenient?

In this session presented by Sebastian Bergmann, the creator of PHPUnit, you will learn about the dangers of „overmocking” as well as how to avoid them. Applying these learnings will lead to better code and tests that are more robust.

Sebastian Bergmann
Creator of PHPUnit
  • Has believed in Open Source from day one
  • He has a university degree in computer science and has created the industry-leading testing tool PHPUnit
  • He shares his comprehensive experiences in publications and at conferences
  • As Co-Founder and Principal Consultant of The PHP Consulting Company (, Sebastian helps his clients to develop software successfully
  • In his free time, he works on PHPUnit, likes board games, and really enjoys making fancy ice-cream
Sign in
Or by mail
Sign in
Or by mail
Register with email
Register with email
Forgot password?