2require_once dirname(__DIR__) .
'/include/dbxSelfTestRunner.class.php';
9foreach (array_slice(
$argv ?? array(), 1) as $argument) {
10 if ($argument ===
'--quick' || $argument ===
'--profile=quick')
$profile =
'quick';
11 if ($argument ===
'--json')
$json =
true;
12 if (str_starts_with($argument,
'--test='))
$requested[] = substr($argument, 7);
18 $total = (int)($current[
'totals'][
'total'] ?? 0);
19 $done = (int)($current[
'totals'][
'completed'] ?? 0);
20 $label = strtoupper((
string)
$result[
'status']);
21 fwrite(STDOUT, sprintf(
"[%d/%d] %-7s %s (%s)\n", $done, $total, $label,
$result[
'name'],
$result[
'duration_ms'] .
' ms'));
22 if ((
$result[
'status'] ??
'') ===
'failed') {
23 fwrite(STDOUT,
' ' . str_replace(
"\n",
"\n ", (
string)
$result[
'summary']) .
"\n");
28 echo json_encode(
$run, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . PHP_EOL;
30 $totals =
$run[
'totals'];
31 fwrite(STDOUT, sprintf(
32 "\nSelf-Test %s: %d bestanden, %d fehlgeschlagen, %d uebersprungen. Protokoll: %s\n",
33 strtoupper((
string)
$run[
'status']),
40exit((
$run[
'status'] ??
'') ===
'passed' ? 0 : 1);
Zentraler, auch ohne Web-Kernel nutzbarer Test-Orchestrator.
foreach(array_slice($argv ?? array(), 1) as $argument) $runner