BuiltByCactus

Engineering Handbook

Testing

This will be discussed on a project by project basis, but unless the application is extremely simple then some level of unit testing will probably be needed.

The most libraries we’ll use are:

PHPUnit

PHPUnit can be downloaded and set up as per the instructions in the Tools section.

Unit tests should be grouped by application module, so one class is one module tested.

Behat

Behat is a BDD testing framework for PHP. We generally use this when testing APIs or complex pages.

The documentation is a great place to get an idea of how it works and Phil Sturgeon’s Build APIs You Won’t Hate is a great resource for learning about API builds and automated testing using Behat.