httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <>
Subject automagical support for PHP scripts in Apache-Test
Date Mon, 18 Oct 2004 20:13:02 GMT
hi all...

I hacked together the start of automagic support for PHP server-based tests.

basically, what the attached patch allows is for auto test script generation
and configuration via Makefile.PL. that is


and a file such as


results is the autogenerated


and a GET to /TestPHP/foo.php, which is properly script-aliased to

if foo.php looks something like

  print "1..3\n";
  print "ok 1\n";
  print "not ok 2\n";
  print "ok 3\n";

you're on your way to writing Test::Harness compatible php scripts via
Apache-Test.  whee!

the missing parts are important parts of Aapche::Test and Apache::TestUtil
implemented in php.  but if we just focused on adding plan(), ok() and
t_cmp() I think we would have enough to ship.  andy lester started some of
this here:

so I just need a clue on how to load a library in php and how to adjust
httpd.conf so that that the library is picked up, then we can port andy's
code over and...

also missing is __DATA__-esque configuration, which would be identical to
the perl implementation once somebody familiar with php tells me what a
similar php token would be - maybe parsing everything following the closing
?> ?  I have no idea.

anyway, fwiw.  any dual-life php folks out there interested in this can feel
free to lend a hand.


View raw message