O'Reilly logo
  • isaac peraza thinks this is interesting:

What makes a good test?

The following are some generic rules that are valid for any unit test and not just PHPUnit:

  • Independent: Each test needs to run independently from other tests and environments.
  • Fast: To have useful tests and be able to run them as often as possible (for example, as pre- or post-commit hooks), tests need to be fast.
  • Repeatable: You should be abl...


Cover of PHPUnit Essentials


Rules of Unit Test.