#!/usr/bin/env php name . "\n"; $test->run(); $fails = array_merge($fails, $test->fails); echo " ok\n"; } show_fails(); // If executed directly expose the fail count to a shell script global $argv; if (!strcasecmp(basename($argv[0]), basename(__file__))) exit(count($fails)); else return count($fails); ?>