php-doc-en/reference/mongo/testing.xml
Kristina Chodorow 74a3aaff8c updated group params
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@299698 c90b9560-bf6c-de11-be94-00142212c4b1
2010-05-24 16:10:09 +00:00

41 lines
1.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<section xml:id="mongo.testing" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Running the Driver's Tests</title>
<para>
The PECL package does not come with the PHP tests, but they are available at
<link xlink:href="&url.mongodb.github;">Github</link>. Download the driver
source and there are tests in the tests/ directory. The driver uses
<link xlink:href="&url.phpunit.install;">PHPUnit</link> for testing, which can
be installed via PEAR.
</para>
<para>
You must set <literal>error_reporting</literal> in php.ini to
<literal>E_STRICT | E_ALL</literal> 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.
</para>
<para>
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:
</para>
<programlisting>
<![CDATA[
$ phpunit tests/MongoSuite.php
]]>
</programlisting>
<para>
Please report any failures or errors in the
<link xlink:href="&url.mongodb.jira;">bugtracker</link>. There may be skipped
tests, these are normal and can be ignored.
</para>
<para>
New tests are always welcome! Please feel free to contribute new tests of any
type testing any functionality.
</para>
</section>