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.
- 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 (thePHP.cc), 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