You want to run the mysqlnd tests, because you never trust anybody else test results? In particular you are getting sceptical if anybody claims to have reached a certain level of stability? Read on, here’s a step-by-step for faking your own test results.
New tests …
PHP extensions can test their userland (PHP) functionality using so called “phpt Tests”. phpt Tests consist of several parts with their main part being regular PHP code to test PHP. On the website of the PHP Quality Assurance Team you can find a documentation of the phpt Tests syntax on the page Writing Tests, if your are interested in the details. Most extensions contain a tests/ subdirectory in the PHP source code to ship the tests together with C code of the extensions. So do ext/mysql and ext/mysqli.
nixnutz@linux-eu6p:~/tmp/php6/ext/mysqli> tree
.
|-- CREDITS
|-- CVS
| |-- Entries
| |-- Repository
| `-- Root
|-- TODO
|-- config.m4
[...]
|-- php_mysqli_structs.h
`-- tests
|-- 001.phpt
|-- 002.phpt
|-- 003.phpt
|-- 004.phpt
[...]
Let’s see how the number of test has changed since the mysqlnd development has started. I do know that quantity does not say anything about quality in the Quality Assurance (QA) world but I cannot resist to present a table which shows how many new tests have been created.
| Before mysqlnd | Today | ||||||
|---|---|---|---|---|---|---|---|
| ext/mysql | ext/mysqli | ext/mysql | ext/mysqli | ||||
| # of tests | loc | # of tests | loc | # of tests | loc | # of tests | loc |
| 3 | 162 | 92 | 3.799 | 53 | 4.198 | 282 | 25.739 |
Take the above figures as what they are: an indicator how much time some people spend writing test code and trying to test mysqlnd properly.
Once again: quantity says nothing about quality, but the figures proof how hard we tried to prevent your test runs of mysqlnd to become a nightmare.
