The way of Testivus

Even if we are already familiar with writing tests, all of the dogma that surrounds testing can be intimidating:

  • Do not interact with the file system; build a virtual file system instead.
  • Do not interact with the database; build a set of data fixtures instead.
  • Rewrite your classes to use interfaces instead of concrete classes, and write test doubles for all the dependencies.

These are the kinds of dogmatic commands that make testing seem like an insurmountable challenge. Surely we can build our tests later when everything else is done! The problem is that there will never be a point when everything else is done, and so the tests will never come into being.

As an antidote to the dogma of testing commandments, I suggest following ...

Get Modernizing Legacy Applications in PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.