function getData($filename, $name)
{
    global $discover_tests;
    if (!array_key_exists($filename, $discover_tests)) {
        $data = readTests($filename);
        if ($data === null) {
            return null;
        }
        $discover_tests[$filename] = $data;
    }
    $file_tests = $discover_tests[$filename];
    if (array_key_exists($name, $file_tests)) {
        return $file_tests[$name];
    } else {
        return null;
    }
}
Exemplo n.º 2
0
            $testData[$key] = $value;
        }
    }
    if (!$firstTest) {
        runTest($testData);
    }
    return true;
}
$rebuild = false;
$group = '';
if (isset($_GET['rebuild'])) {
    $rebuild = true;
}
if (isset($_GET['group'])) {
    $group = $_GET['group'];
}
// Read in the test scripts
$dir = opendir('regress');
$success = true;
while ($success and ($file = readdir($dir)) != false) {
    if (substr($file, -5) == '.test') {
        if ($group == '' or strpos($file, $group) !== false) {
            $success = readTests("regress/{$file}");
        }
    }
}
?>
</table>
</body>
</html>