Avoiding Mockageddon

Sebastian Bergmann | PHP.RUHR |

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 [*]
Als PDF speichern