Exemplo n.º 1
0
    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.
if (file_exists($app . '/Tests/init.json')) {
    $created = Pluf_Test_Fixture::loadFile($app . '/Tests/init.json');
} else {
    $created = array();
}
$test->run($reporter);
$mig->unInstall();