public static function suite() { $suite = new PHPUnit_Framework_TestSuite('Plume_Framework_Test'); $dirs = getTestDirs(); foreach ($dirs as $dir) { $testfiles = getTestFiles($dir); foreach ($testfiles as $test) { $suite->addTestFile(substr($test, 2)); } } return $suite; }
e('configuration variable in your configuration file.'); e('For example: $cfg[\'simple_test_path\'] = \'/home/you/simpletest\'; '); exit(1); } $testfolder = $app . '/Tests/'; if (!file_exists($testfolder)) { e(sprintf('The test folder does not exists: %s.', $app . '/Tests/')); exit(1); } define('SIMPLE_TEST', $simple_test . '/'); require_once SIMPLE_TEST . 'unit_tester.php'; require_once SIMPLE_TEST . 'reporter.php'; $files = getTestFiles($testfolder); $dirs = getTestDirs($testfolder); foreach ($dirs as $dir) { foreach (getTestFiles($dir) as $test) { $files[] = $test; } } $test =& new GroupTest(sprintf('All tests for application %s.', $app)); foreach ($files as $t) { if (!function_exists('apc_store') && 'Pluf_Tests_Cache_Apc' === $t[1]) { continue; } $test->addTestCase(new $t[1]()); } $reporter = new TextReporter(); $mig = new Pluf_Migration(null); $mig->display = false; $mig->install(); // If available, load an initialisation file.