When you run PHPUnit from the command line, it first looks in its existing directory for any phpunit.xml
file to provide settings, and if it contains the path to a bootstrap file, then that bootstrap file will be executed beforehand.
The bootstrap file should be able to provide the source of the classes to be tested (by setting them up, if the test files themselves don't).
After that, it recursively looks in directories in the current working directory, for files that follow the naming convention XXXTest.php
, then executes them.
Simply put, just navigate to your test folders and run phpunit
.