This post originated from an RSS feed registered with PHP Buzz
by Chris Shiflett.
Original Post: Apache-Test for the PHP CLI
Feed Title: Chris Shiflett's Blog
Feed URL: http://www.feedburner.com/fb/static/error.html
Feed Description: Author, Consultant, Programmer, Speaker, Trainer
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.