Apache-Test for the PHP CLI
27 Jan 2005Now there's even more reason to be using Apache-Test to test PHP applications:
From Geoff's blog:
today I added the ability to run client-side PHP scripts to Apache-Test. so, now you can have
t/foo.t
t/bar.php
t/response/TestPHP/baz.php
all within the same t/ directory.
the perl script t/foo.t will run using perl, just like always. t/bar.php will run using the php command-line interpreter, while t/response/TestPHP/baz.php will run via PHP within the Apache runtime (through standard Apache-Test magic). and all are executed with a simple make test and tabulated on the command line like you would expect.
Geoff also provides an example t/foo.php:
<?php
require 'test-more.php';
plan(1);
diag('this is a php test');
is('php', 'perl', 'something php passed');
?>
This is a really great testing framework for PHP that I hope keeps getting more and more attention.