1.5. Running PHPUnit tests
MantisBT has a suite of PHPUnit tests found in the tests
directory. You are encouraged to add your own tests for the patches you are submitting, but please remember that your changes must not break existing tests.
In order to run the tests, you will need to have the PHP Soap extension,
PHPUnit 3.4 or newer and
Phing 2.4 or newer installed. The tests are configured using a
bootstrap.php
file. The
boostrap.php.sample
file contains the settings you will need to adjust to run all the tests.
Running the unit tests is done from root directory using the following command:
phing test
1.5.1. Running the SOAP tests
MantisBT ships with a suite of SOAP tests which require an initial set up to be executed. The required steps are:
Install MantisBT locally and configure a project and a category.
Adjust the bootstrap.php
file to point to your local installation.
Customize the config_inc.php
to enable all the features tested using the SOAP tests. The simplest way to do that is to run all the tests once and adjust it based on the skipped tests.