I've just started looking at how to create unit tests for the core of
PEAR. This task is overwhelming, since there are years of things being
added without unit tests. To test the installer requires the creation
of a fake PEAR install with fake installation packages and in fact there
are so many control variables that I hardly know where to start. It's
quite conceivable that the complexity of the fake environment will
introduce new bugs, requiring test cases for the take environment itself
to make sure it actually works.
I wonder if it might make more sense to create a package specifically
designed for testing the core, rather than using the runtests.php. This
package would have to be able to set up a very complex test environment
easily, including custom installations of PEAR, and pass each test to
runtests.php. Unfortunately, this will take a long time to perfect, and
so before I were to even begin such a project, I would like the ideas
and the code support of others. I don't think this QA package can
really work if only one person writes the code.
A simpler system for testing the core is desperately needed, so any
ideas/people interested in helping?