Testing

PDO has a set of "core" tests that all drivers should pass before being
released. They're designed to run from the PHP source distribution, so
running the tests for your driver requires moving things around a bit.
The suggested procedure is to obtain the latest PHP 5.1 snapshot and
perform the following step:

$ cp -r pdo_SKEL /path/to/php-5.1/ext

This will allow the test harness to run your tests. The next thing you
need to do is create a test that will redirect into the PDO common core tests.
The convention is to name this file common.phpt; it
should be placed in the tests subdirectory that was created by
ext_skel when you created your extension skeleton.
The content of this file should look something like the following:

This will cause the common core tests to be run, passing the values of
PDOTEST_DSN, PDOTEST_USER and
PDOTEST_PASS to the PDO constructor as the
dsn, username and
password parameters. It will first check the environment, so
that appropriate values can be passed in when the test harness is run,
rather than hard-coding the database credentials into the test file.