Tag Archives: bootstrap

PHPUnit Bootstrap and Autoloading classes

The PHPUnit Bootstrap is perfect when there is code to be run before tests are executed. The limitation however is there can only be one bootstrap per PHPUnit configuration file.

This is an issue if there are a set of classes that need to be included – we don’t want to manually include every class every test could possibly need.

PHP’s Autoloading feature comes to the rescue, allowing us to seamlessly include classes as they’re required for tests.
Continue reading

Tagged , , , , ,