PHP support for Apache-Test

geoff on 2004-10-19T16:04:10

Chris and I are working feverishly on our co-presented talk for ApacheCon (which we are practicing next week at NYPHP) on testing PHP with Perl.



the first aspect of the talk (from a testing standpoint, that is) is to use Apache-Test to make requests to some php pages that are part of a smallish application using built-in Apache-Test tools as well as standard perl tools like WWW::Mechanize. the way Apache-Test creates a pristine and self-contained Apache environment is just perfect for this kind of thing.



the second step is actually a bit more interesting. over in mod_perl land we use PerlHandlers to interact with Test::Harness so that we can unit test perl modules that rely on an Apache enviroment, such as the entire mod_perl API. well, I've been hacking away at the Apache-Test server-side interface and have added all the hooks necessary to have php server-side tests as well. in other words, use Test::Harness to run *.t tests that query a running Apache server and feed results right back to Test::Harness over STDOUT. I even integrated (and began to expand) Andy's Test::More emulation layer for PHP to make life even easier.



have no idea what I'm talking about? install Apache-Test then unpack and run this tarball and you'll have a taste of what is possible (and what our talk will only begin to touch upon). of course, you'll need a php-enabled Apache first, but installing php isn't all that bad. honest.



next up, a similar Apache-Test server-side harness for mod_parrot.