Running Tests ============= Prerequisites ============= PHPUnit ------- phpBB unit tests use PHPUnit framework. Version 3.5 or better is required to run the tests. PHPUnit prefers to be installed via PEAR; refer to http://www.phpunit.de/ for more information. PHP extensions -------------- Unit tests use several PHP extensions that board code does not use. Currently the following PHP extensions must be installed and enabled to run unit tests: - ctype (also a PHPUnit dependency) - dom (PHPUnit dependency) - json (also a phpBB dependency) Some of the functionality in phpBB and/or the test suite uses additional PHP extensions. If these extensions are not loaded, respective tests will be skipped: - apc (APC cache driver) - bz2 (compress tests) - interbase, pdo_firebird (Firebird database driver) - mysql, pdo_mysql (MySQL database driver) - mysqli, pdo_mysql (MySQLi database driver) - pcntl (flock class) - pdo (any database tests) - pgsql, pdo_pgsql (PostgreSQL database driver) - redis (https://github.com/nicolasff/phpredis, Redis cache driver) - simplexml (any database tests) - sqlite, pdo_sqlite (SQLite database driver, requires SQLite 2.x support in pdo_sqlite) - zlib (compress tests) Database Tests -------------- By default all tests requiring a database connection will use sqlite. If you do not have sqlite installed the tests will be skipped. If you wish to run the tests on a different database you have to create a test_config.php file within your tests directory following the same format as phpBB's config.php. An example for mysqli can be found below. More information on configuration options can be found on the wiki (see below).