#!/usr/bin/php 1) { /* If command line arguments are given, then only test those. */ array_shift($argv); $tests = $argv; $group = new GroupTest('Selected PEL tests'); } else { /* otherwive test all .php files, except this file (run-tests.php). */ $tests = array_diff(glob('*.php'), array('run-tests.php')); $group = new GroupTest('All PEL tests'); /* Also test all image tests (if they are available). */ if (is_dir('image-tests')) { $image_tests = array_diff(glob('image-tests/*.php'), array('image-tests/make-image-test.php')); $image_group = new GroupTest('Image Tests'); foreach ($image_tests as $image_test) $image_group->addTestFile($image_test); $group->addTestCase($image_group); } else { echo "Found no image tests, only core functionality will be tested.\n"; echo "Image tests are available from http://pel.sourceforge.net/.\n"; } } foreach ($tests as $test) $group->addTestFile($test); $group->run(new TextReporter()); ?>