Unit tests

Unit tests are written with the PHPUnit framework.

You can run all tests with:

./vendor/bin/phing unit-tests

Location

Tests are placed in the test directory, within additional subdirectories conform PSR-4.

Naming conventions

Tests are named after the class they are testing, with the suffix Test.

Test methods use snake case naming, as opposed to the rest of the code base. This makes it easier to generate meaningful, human readable descriptions from the test cases with PHPUnit's TestDox feature.

More info

Consult the PHPUnit manual for more information.

Last updated