Avoiding Mockageddon

Sebastian Bergmann | PHP fwdays'20 Special Edition |

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.

3 / 100
Download PDF

About the presenter

Sebastian Bergmann

Sebastian Bergmann is the author of PHPUnit and sets the industry standard of quality assurance.