Running the Driver's Tests
The PECL package does not come with the PHP tests, but they are available at » Github. Download the driver source and there are tests in the tests/ directory. The driver uses » PHPUnit for testing, which can be installed via PEAR.
You must set error_reporting in php.ini to E_STRICT | E_ALL for all of the tests to pass. If you do not, you will get some failures that say the test was expecting a warning or error.
To run the tests, make sure that there is a MongoDB server running locally on port 27017. Make sure you're in the main directory of the driver source you downloaded from Github. Run:
$ phpunit tests/MongoSuite.php
Please report any failures or errors in the » bugtracker. There may be skipped tests, these are normal and can be ignored.
New tests are always welcome! Please feel free to contribute new tests of any type testing any functionality.